ImgCopy

Top  Previous  Next

Prototype

 

IntImage:=ImgCopy(intImageHandle,IntLeft,intTop,intRight,intBottom)

 

Description

 

Produces a copy of the image rectangle shown by coordinates.

 

Parameters

 

intImageHandle: integer value corresponding to the image handle.

 

IntLeft,intTop: integer values (they show column and line respectively) corresponding to the corner on the top left of the rectangle.

 

intRight,intBottom: integer values (they show column and line respectively) corresponding to the corner on the bottom right of the rectangle.

 

Returned value

 

IntImage: integer value corresponding to the image rectangle handle.

 

Notes

 

Using four '0' for specifying corners coordinates, the whole image is copied : fullCopy:=ImgCopy(_CurrentImage,0,0,0,0);.

 

Example

 

// Make a copy of full original image

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

 

// Threshold current image

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

 

// Refine thresholding

ImgRefineThreshold(_CurrentImage, OriginalGrayScaleImage, 20);

 

// Delete the original grayscale image

ImgDelete(OriginalGrayScaleImage);