SkewDetection estimates the orientation angle (in degrees) of the lines of text.

Apply this method only to images that contains printed text.

SkewDetection can be very slow on large images, so applications can resample analyzed image using ResampleWidth parameter to enhance performance.

No resample is performed when ResampleWidth is zero.

Namespace: HiComponents.IEvolution
Assembly: IEvolution2 (in IEvolution2.dll) Version: 10.1.0.0

Syntax

         
 C#  Visual Basic  Visual C++ 
public double SkewDetection(
	int resampleWidth,
	int angleRange,
	double precision,
	bool edgeDetect
)
Public Function SkewDetection ( _
	resampleWidth As Integer, _
	angleRange As Integer, _
	precision As Double, _
	edgeDetect As Boolean _
) As Double
public:
double SkewDetection(
	int resampleWidth, 
	int angleRange, 
	double precision, 
	bool edgeDetect
)

Parameters

resampleWidth
Int32
The resample width
angleRange
Int32
specifies the working range in degrees. Low values enhance performance and accuracy. For example specifing 30 SkewDetection will scan the image searching for pixels inside a range of -15 to 15 degrees. AngleRange can be from 1 to 180.
precision
Double
specifies the angle precision in degrees. It must be >0 and less or equal to 1 with only one decimal digit. Typical value is 0.1.
edgeDetect
Boolean
if true applies an edge detect algorithm before of skew detection.

Return Value

The found angle of the text

Examples

CopyC#
double angle = Image.SkewDetection( Image.Width/4, 30, 0.1 );
Image.Rotate( angle, true );

See Also