ImgRefineThreshold

Top  Previous  Next

Prototype

 

ImgRefineThreshold(intImageHandle, intOriginalGrayImage, intThreshold)

 

Description

 

This function refines thresholding by comparing the original grayscale image with the binarized image.  The results will remove white or black noise according to adjacent pixel similarity under a specified threshold.

 

Parameters

 

intImageHandle: integer value corresponding to the image handle.

 

intOriginalGrayImage: value specifying the handle of original grayscale image.

 

intThreshold: value specifying a threshold to consider similar adjacent grayscale pixels.

 

Returned value

 

None.

 

Example

 

// Make a copy of full original image

OriginalGrayScaleImage:=ImgCopy(_CurrentImage,0,0,0,0);

 

// Threshold current image

ImgBackTrackThreshold(_CurrentImage,5,5,140,200,70);

 

// Refine thresholding

ImgRefineThreshold(_CurrentImage, OriginalGrayScaleImage, 20);

 

// Delete the original grayscale image

ImgDelete(OriginalGrayScaleImage);