ImageGear for C and C++ on Windows v19.8 - Updated
IG_REC_image_deskew3D
API Reference Guide > Recognition Component API Reference > Recognition Component Functions Reference > Recognition Image Preprocessing Functions > IG_REC_image_deskew3D

Performs a three-dimensional deskew on the image.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_REC_image_deskew3D(
   HIG_REC_IMAGE hImage
);

Arguments:

Name Type Description
hImage HIG_REC_IMAGE Image handle.

Return Value:

The number of ImageGear errors that occurred during the function call.

Supported Raster Image Formats:

See IG_REC_image_import.

Example:

 
Copy Code
AT_ERRCOUNT ErrCount = 0;
HIG_REC_IMAGE higRecImage = 0;
HIGEAR higImage = 0;

ErrCount += IG_load_file("Image.tif", &higImage); 
ErrCount += IG_REC_image_import(higImage, &higRecImage);
ErrCount += IG_REC_image_deskew3D(higRecImage);
ErrCount += IG_REC_image_recognize(higRecImage);

//...

ErrCount += IG_REC_image_delete(higRecImage);
ErrCount += IG_image_delete(higImage);

Remarks:

This function attempts to correct the skew and perspective distortion that can occur in captured images. Typically, this distortion is common in images taken with a digital camera, though this function can be used with any image with similar distortion, regardless of the capture method.

The primary correction applied by this algorithm is to transform parallel text lines so they are horizontal, and to align column edges vertically. To do this, a certain number of characters, text lines, and column edges are required. Column edges mean that the beginning and/or end of consecutive text lines have identical positions (i.e., the left edge of a column aligned left or both edges of a justified column). The minimal quantities are approximately 10 text lines and a single edge of two columns or both edges of one column. The accuracy of the algorithm increases when there are a good number of lines and column edges and when these are not confined to a small area of the image. If the image contains only figures or graphics, no transformation will occur.

See Also

HIG_REC_IMAGE