illuminate ( Image : ImageIlluminate : MaskWidth, MaskHeight, Factor : )

Illuminate image.

The operator illuminate enhances contrast. Very dark parts of the image are "illuminated" more strongly, very light ones are "darkened". If orig is the original gray value and mean is the corresponding gray value of the low pass filtered image detected via the operators mean_image and filter size MaskHeight x MaskWidth. For byte-images val equals 127, for int2-images and uint2-images val equals the median value. The resulting gray value is new:

             new = round ( (val - mean) * Factor + orig ).
   Height Width  Factor
   ---------------------
    40     40     0.55
   100    100     0.7
   150    150     0.8


Parameters

Image (input_object)
(multichannel-)image(-array) -> object : byte / int2 / uint2
Image to be enhanced.

ImageIlluminate (output_object)
(multichannel-)image(-array) -> object : byte / int2 / uint2
"Illuminated" image.

MaskWidth (input_control)
extent.x -> integer
Width of low pass mask.
Default value: 101
Suggested values: 31, 41, 51, 71, 101, 121, 151, 201
Typical range of values: 3 <= MaskWidth <= 299
Minimum increment: 2
Recommended increment: 10

MaskHeight (input_control)
extent.y -> integer
Height of low pass mask.
Default value: 101
Suggested values: 31, 41, 51, 71, 101, 121, 151, 201
Typical range of values: 3 <= MaskHeight <= 299
Minimum increment: 2
Recommended increment: 10

Factor (input_control)
real -> real
Scales the "correction gray value" added to the original gray values.
Default value: 0.7
Suggested values: 0.3, 0.5, 0.7, 1.0, 1.5, 2.0, 3.0, 5.0
Typical range of values: 0.0 <= Factor <= 5.0
Minimum increment: 0.01
Recommended increment: 0.2
Restriction: (0 < Factor) && (Factor < 5)


Example
read_image(Image,'fabrik') 
disp_image(Image,WindowHandle) 
illuminate(Image,Better,40,40,0.55) 
disp_image(Better,WindowHandle).

Result

If the parameter values are correct the operator illuminate 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 handling is raised.


Parallelization Information

illuminate is reentrant and automatically parallelized (on tuple level, channel level, domain level).


Possible Successors

disp_image


Alternatives

scale_image_max, equ_histo_image, mean_image, sub_image


See also

emphasize, gray_histo


Module

Image filters



Copyright © 1996-2005 MVTec Software GmbH