Accusoft ImagXpress 12
DocumentDeskew Method
See Also  Send comments on this topic.
MinimumAngle

A double value which represents the amount of skew (in degrees) considered acceptable by the caller. This allows the caller to keep images with small amounts of skew untouched potentially increasing performance in batch operations where some skew is acceptable. Angles less than or equal to this amount will not be corrected.

Range: 0 - 5

Typical: 0.2

 

MinimumConfidence

An integer value which represents the minimum detection confidence required before correction will proceed. If the detection confidence is less than this value, the image will not be modified.

Range: 0 - 100

Typical: 50

 

PadColor

A long value which indicates the pad color.

Valid values:

0 = black pixels will be added to pad the image.

0x7FFFFFFF = white pixels will be added to pad the image.

Typical: white.

 

MaintainOriginalSize

A boolean flag indicates whether the size of the image should be maintained unchanged, or allowed to change. Typically, this will be False and the deskewed image will be slightly larger than the original image.

Range: True or False

Typical: False

 

Quality

An integer value indicates the amount of effort to expend analyzing the image to determine the correct skew. Set to a high value to ensure the most accurate possible result and to a low value for fastest operation.

Range: 1 - 100

Typical: 80

AccusoftImagXpress12 ActiveX DLL > ImagXpress Object : DocumentDeskew Method

Glossary Item Box

Description

Automatically detects and removes skew from current 1-bit depth images.

Syntax

Visual Basic
Public Sub DocumentDeskew( _
   ByVal MinimumAngle As Double, _
   ByVal MinimumConfidence As Integer, _
   ByVal PadColor As Long, _
   ByVal MaintainOriginalSize As Boolean, _
   ByVal Quality As Integer _
) 

Parameters

MinimumAngle

A double value which represents the amount of skew (in degrees) considered acceptable by the caller. This allows the caller to keep images with small amounts of skew untouched potentially increasing performance in batch operations where some skew is acceptable. Angles less than or equal to this amount will not be corrected.

Range: 0 - 5

Typical: 0.2

 

MinimumConfidence

An integer value which represents the minimum detection confidence required before correction will proceed. If the detection confidence is less than this value, the image will not be modified.

Range: 0 - 100

Typical: 50

 

PadColor

A long value which indicates the pad color.

Valid values:

0 = black pixels will be added to pad the image.

0x7FFFFFFF = white pixels will be added to pad the image.

Typical: white.

 

MaintainOriginalSize

A boolean flag indicates whether the size of the image should be maintained unchanged, or allowed to change. Typically, this will be False and the deskewed image will be slightly larger than the original image.

Range: True or False

Typical: False

 

Quality

An integer value indicates the amount of effort to expend analyzing the image to determine the correct skew. Set to a high value to ensure the most accurate possible result and to a low value for fastest operation.

Range: 1 - 100

Typical: 80

Remarks

Deskew is the process of straightening an image by examining it and determining the appropriate amount of rotation needed for correct alignment.

The detection process focuses on the content of the image, such as text and drawings, rather than the border. Deskew adjusts along the vertical and horizontal axes, optimizing each to provide the best image.

  • If no image is present, an error is indicated. ImagXpress validates the input, detects the skew, corrects the skew (if necessary) and returns results from the process.
  • This method is only corrected if the detection confidence is greater than or equal to the MinimumConfidence input and the skew angle is greater than the MinimumAngle input.
  • If the skew is corrected and MaintainOriginalSize is False, then the previous current image is released and a new DIB is created to hold the new current image. No error is returned if the previous current image could not be released. If the operation fails, the current image is unchanged.

 

Outputs

  • The component's current image is deskewed if the operation is successful. If the skew was not corrected for any reason, this image will not be modified or released.
  • IPRotationAngle is set with the angle needed to correct the skew.
  • IPVariation is set with the amount of variation detected in the skew of the image.
  • IPConfidence is set with the confidence of the skew detection process.
  • IPImageWasModified is set to true if image was modified, and to false if image was not modified.

 

Using DocumentDeskew method

1. Load a 1 bit image from a file or stream input.

2. Call DocumentDeskew

3. Examine properties (The image is deskewed according to parameters specification and limitations.)

 

Note: Available in Professional Edition.

See Also

©2013. Accusoft Corporation. All Rights Reserved.