ImgDynamicThresholdMinMax

Top  Previous  Next

Prototype

 

ImgDynamicThresholdMinMax (intImageHandle, intLocalWidth,intLocalHeight, intLocalContrast, intBrightness)

 

Description

 

Converts a grayscale image applying dynamic thresholding based on min/max algo. For each pixel its evaluated its contrast respect other pixels in the local window  and if its above the local contrast value, it's binarized using the local threshold computed automatically using minimum and maximum gray pixels in the local window. The process can be customized selecting local windows size, local contrast and global brightness.

 

Parameters

 

intImageHandle: integer value corresponding to the image handle.

 

intLocalWidth: value specifying window width.

 

intLocalHeight: value specifying window height.

 

intLocalContrast: reference value for evaluating local contrast, between 0 and 255. Use -1 to allow auto-calculation of the best value for the image.

 

intBrightness: global brightness of resulting image, between 0 and 255. A low value produces a darker images, an high value produces a lighter image. Use -1 to allow auto-calculation of the best value for the image.

 

 

Returned value

 

None.

 

Example

 

// Applies dynamic thresholding minmax

ImgDynamicThresholdMinMax(_CurrentImage,7,7,16,128);