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_image(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_image(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/uint2-image
or the signed result (FilterType 'int4') in an
int4-image.
|
Image (input_object) |
(multichannel-)image(-array) -> object : byte / uint2 |
| Input image. | |
|
ImageLaplace (output_object) |
(multichannel-)image(-array) -> object : byte / uint2 / int4 |
| Laplace-filtered result images. | |
|
FilterType (input_control) |
string -> string |
| Calculate the absolute value of the filter to a byte/uint2-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_crossing(Laplace,&ZeroCrossings);
laplace returns 2 (H_MSG_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 handling is raised.
laplace is reentrant and automatically parallelized (on tuple level, channel level, domain level).
diff_of_gauss, laplace_of_gauss
Foundation