The following examples show the effect of a Laplacian filter applied
with a number of different settings.
[C#]
void function() {
using (Doc doc = new Doc()) {
AddImagePage(doc, img3); // original image
doc.Rendering.Save("EffectLaplacian.jpg");
using (ImageLayer layer = AddImagePage(doc, img3)) {
using (EffectOperation effect = new EffectOperation("Laplacian")) {
effect.Parameters["Radius"].Value = 0.8;
effect.Apply(layer.PixMap);
}
}
doc.Rendering.Save("EffectLaplacian08.jpg");
using (ImageLayer layer = AddImagePage(doc, img3)) {
using (EffectOperation effect = new EffectOperation("Laplacian")) {
effect.Parameters["Radius"].Value = 1.6;
effect.Apply(layer.PixMap);
}
}
doc.Rendering.Save("EffectLaplacian16.jpg");
using (ImageLayer layer = AddImagePage(doc, img3)) {
using (EffectOperation effect = new EffectOperation("Laplacian")) {
effect.Parameters["Radius"].Value = 3.2;
effect.Apply(layer.PixMap);
}
}
doc.Rendering.Save("EffectLaplacian32.jpg");
}
}
[Visual Basic]
Sub ...
Using doc As New Doc()
AddImagePage(doc, img3)
' original image
doc.Rendering.Save("EffectLaplacian.jpg")
Using layer As ImageLayer = AddImagePage(doc, img3)
Using effect As New EffectOperation("Laplacian")
effect.Parameters("Radius").Value = 0.8
effect.Apply(layer.PixMap)
End Using
End Using
doc.Rendering.Save("EffectLaplacian08.jpg")
Using layer As ImageLayer = AddImagePage(doc, img3)
Using effect As New EffectOperation("Laplacian")
effect.Parameters("Radius").Value = 1.6
effect.Apply(layer.PixMap)
End Using
End Using
doc.Rendering.Save("EffectLaplacian16.jpg")
Using layer As ImageLayer = AddImagePage(doc, img3)
Using effect As New EffectOperation("Laplacian")
effect.Parameters("Radius").Value = 3.2
effect.Apply(layer.PixMap)
End Using
End Using
doc.Rendering.Save("EffectLaplacian32.jpg")
End Using
End Sub
|
|
|
Original Image before Laplacian Filter
|
|
Laplacian Radius 0.8 Pixels
|
|
Laplacian Radius 1.6 Pixels
|
|
Laplacian Radius 3.2 Pixels
|
|
|
|
|