Calculate the Laplace operator by using finite differences.
laplace__ filters the input images Image using a Laplace operator. Depending on the parameter NeighbourhoodType the following simple approximations of the Laplace operator are used:
'n_4':
1
1 -4 1
1
'n_8':
1 1 1
1 -8 1
1 1 1
'n_8_isotrop':
10 22 10
22 -128 22
10 22 10
The filter 'n_8' corresponds to the filter mask used in
highpass__(O:R:3,3:). For a Laplace operator with size
3x3, the corresponding filter is applied directly,
while for larger filter sizes (Size = 5,7,9 and 11) the
input image is first smoothed using a Gaussian filter of the
selected size. Therefore,
laplace__(O:R:int4,S,N:)
for Size > 3 is equivalent to
gauss__(O:G:S:) >
laplace__(G:R:int4,3,N:).
laplace__ either returns the absolute value of the
Laplace filtered image (FilterType 'abs') in a byte-image
or the signed result (FilterType 'int4') in an
int4-image.
laplace__ is only implemented for byte-images.
|
Image (input_object) |
image(-array) -> object : byte |
| Input image. | |
|
ImageLaplace (output_object) |
image(-array) -> object : byte / int4 |
| Laplace-filtered result images. | |
|
FilterType (input_control) |
string -> string |
| Calculate the absolute value of the filter to a byte-image or the signed result to an int4-image. | |
| Default value: 'int4' | |
| List of values: 'abs', 'int4' | |
|
Size (input_control) |
integer -> integer |
| Size of filter mask. | |
| Default value: 3 | |
| List of values: 3, 5, 7, 9, 11 | |
|
NeighbourhoodType (input_control) |
string -> string |
| Neighborhood used in the Laplace operator | |
| Default value: 'n_8_isotrop' | |
| List of values: 'n_4', 'n_8', 'n_8_isotrop' | |
read_image(&Image,"mreut"); laplace__(Image,&Laplace,"int4",3,"n_8_isotrop"); zero_crossing2(Laplace,&ZeroCrossings);
laplace__ returns TRUE if all parameters are correct. If the input is empty the behaviour can be set via set_system(::'no_object_result',<Result>:). If necessary, an exception is raised.
zero_crossing1, zero_crossing2
diff_of_gauss__, laplace_of_gauss