ImgBackTrackThresholdiAverage |
Top Previous Next |
Prototype
ImgBackTrackThresholdAverage (intImageHandle, intLocalWidth, intLocalHeight, intMinThreshold, intMaxThreshold, intContribute)
Description
Converts a grayscale image by applying background tracking thresholding. Each pixel of image is binarized using a local threshold value computed automatically by analyzing surrounding pixels in the specified window size so that a automatic global threshold value is corrected using a local value obtained averaging grayscale values of local window. The process can be customized selecting several parameters.
Parameters
intImageHandle: integer value corresponding to the image handle.
intLocalWidth: value specifying window width.
intLocalHeight: value specifying window height.
intMinThreshold: value specifying minimal threshold to use, between 0 and 255. Use -1 to allow auto-calculation of the best value for the image.
intMaxThreshold: value specifying maximum threshold to use, between 0 and 255. Use -1 to allow auto-calculation of the best value for the image.
intContribute: the contribute percentage, between 0 and 100% of local threshold over global threshold.
Returned value
None.
Example
// Applies background tracking thresholding ImgBackTrackThresholdAverage(_CurrentImage,5,5,140,200,70); |