Deskew method (Main Control)

C++ Builder example

Delphi example

 

Builder Syntax

int Deskew (unsigned crFill, unsigned uFlags, L_PINT pnAngle);

Delphi Syntax

Function Deskew (crFill: COLORREF; uFlags: L_UINT; pnAngle: L_PINT): L_INT;

Overview

Refer to Examining and Altering Bitmaps.

Remarks

(Document/Medical) Rotates the bitmap to straighten it. This method typically is used to automatically straighten scanned images.

If uFlags contains DSKW_NOPROCESS, the method will update the nAngle parameter with the deskew angle, without rotating the image.

The calculated rotation is limited to 10 degrees in either direction. This method is intended for images, such as scanned documents, that are mainly horizontal lines of text. The results are unpredictable with other types of images.

The color specified by crFill will be used to fill the background.

This method supports 12 and 16-bit grayscale images and 48 and 64-bit color images. Support for 12 and 16-bit grayscale images and 48 and 64-bit color images is available only in the Document/Medical toolkits. If the image is 12 and 16-bit grayscale and 48 and 64-bit color, the method will not return an error.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements:

Rotate method, ApplyTransformationParameters method, GetMarksCenterMass method, GetTransformationParameters method, IsRegMark method, SearchRegMarks method

Topics:

Raster Images: Doing Geometric Transformations

 

Raster Image Functions: Document Imaging

 

Detecting Registration Marks

 

Using Color Values in LEADTOOLS