Extract high frequency components from an image.
highpass__ extracts high frequency components in an image by applying a linear filter with the following matrix (in case of a 7x5 matrix): 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -35 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 This corresponds to applying a mean operator (mean__), and then subtracting the original gray value. A value of 128 is added to the result, i.e., zero crossings occur for 128.
This filter emphasizes high frequency components (edges and corners). The cutoff frequency is determined by the size (Height x Width) of the filter matrix: the larger the matrix, the smaller the cutoff frequency is.
At the image borders the pixels' gray values are mirrored. In case of over- or underflow the gray values are clipped (255 and 0, resp.).
If even values are passed for Height or Width, the operator uses the next larger odd value instead. Thus, the center of the filter mask is always uniquely determined.
Image (input_object) |
image(-array) -> object : byte |
Input image. |
Highpass (output_object) |
image(-array) -> object : byte |
High-pass-filtered result image. |
Width (input_control) |
extent.x -> integer |
Width of the filter mask. | |
Default value: 9 | |
Suggested values: 3, 5, 7, 9, 11, 13, 17, 21, 29, 41, 51, 73, 101 | |
Range of values: 3 <= Width <= 501 | |
Minimum increment: 2 | |
Recommended increment: 2 | |
Restriction: (Width >= 3) && odd(Width) |
Height (input_control) |
extent.y -> integer |
Height of the filter mask. | |
Default value: 9 | |
Suggested values: 3, 5, 7, 9, 11, 13, 17, 21, 29, 41, 51, 73, 101 | |
Range of values: 3 <= Height <= 501 | |
Minimum increment: 2 | |
Recommended increment: 2 | |
Restriction: (Height >= 3) && odd(Height) |
highpass__(Image,&Highpass,7,5); threshold__(Highpass,&Region,60.0,255.0); skeleton(Region,&Skeleton);
highpass__ 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.
mean__, sub__, convol__, bandpass__