ImgAdaptiveThresholdMinMax

Top  Previous  Next

Prototype

 

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

 

Description

 

Converts a grayscale image applying dynamic thresholding based on min/max algo. Each pixel in not homogeneous areas its 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 homogeneous area, 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,20,128);