Operators |
emphasize — Enhance contrast of the image.
emphasize(Image : ImageEmphasize : MaskWidth, MaskHeight, Factor : )
The operator emphasize emphasizes high frequency areas of the image (edges and corners). The resulting images appears sharper.
First the procedure carries out a filtering with the low pass (mean_image). The resulting gray values (res) are calculated from the obtained gray values (mean) and the original gray values (orig) as follows:
res := round((orig - mean) * Factor) + origFactor serves as measurement of the increase in contrast. The division frequency is determined via the size of the filter matrix: The larger the matrix, the lower the division frequency.
As an edge treatment the gray values are mirrored at the edges of the image. Overflow and/or underflow of gray values is clipped.
Note that filter operators may return unexpected results if an image with a reduced domain is used as input. Please refer to the chapter Filters.
Image to be enhanced.
contrast enhanced image.
Width of low pass mask.
Default value: 7
Suggested values: 3, 5, 7, 9, 11, 15, 21, 25, 31, 39
Typical range of values: 3 ≤ MaskWidth ≤ 201
Minimum increment: 2
Recommended increment: 2
Height of the low pass mask.
Default value: 7
Suggested values: 3, 5, 7, 9, 11, 15, 21, 25, 31, 39
Typical range of values: 3 ≤ MaskHeight ≤ 201
Minimum increment: 2
Recommended increment: 2
Intensity of contrast emphasis.
Default value: 1.0
Suggested values: 0.3, 0.5, 0.7, 1.0, 1.4, 1.8, 2.0
Typical range of values: 0.0 ≤ Factor ≤ 20.0 (sqrt)
Minimum increment: 0.01
Recommended increment: 0.2
Restriction: 0 < Factor && Factor < 20
read_image(Image,'mreut') dev_display (Image) draw_region(Region,WindowHandle) reduce_domain(Image,Region,Mask) emphasize(Mask,Sharp,7,7,2.0) dev_display (Sharp)
If the parameter values are correct the operator emphasize returns the value 2 (H_MSG_TRUE) The behavior in case of empty input (no input images available) is set via the operator set_system(::'no_object_result',<Result>:). If necessary an exception is raised.
mean_image, sub_image, laplace, add_image
Foundation
Operators |