ImageEn, unit imageenproc |
|
TImageEnProc.SkewDetectionFine
Declaration
function SkewDetectionFine(StartingAngle: Double; resolution: Double; range: Integer; maxQuality: Boolean): Double;
Description
Estimate the orientation angle (in degrees) of the lines of text. Rather than using a Hough transform like
SkewDetection, SkewDetectionFine performs progressive rotations to find the best orientation.
Parameter | Description |
StartingAngle | The angle to start testing (0 if you don't know) |
Resolution | The increments of angle tested (0.1 is good) |
Range | The range of angles to test (specifying 10, for example, to test from -5 to +5) |
MaxQuality | if False, testing is only performed on a thumbnail to speed up processing (at the cost of accuracy) |
Note:
◼Apply this method only to images that contains printed text
◼If the image
PixelFormat is not ie24RGB or ie1g, it will be converted
◼SkewDetectionFine uses an algorithm to calculate skew, rather than analyzing the document content. For more accurate skew detection use:
getTextAngle
| Demos\ImageEditing\EveryMethod\EveryMethod.dpr |
// Load test image
ImageEnView1.IO.LoadFromFile( 'D:\TestImage.jpg' );
// Check for skew within the range -5 to 5 with 0.1 degrees of precision and automatically orient (for printed text)
d := ImageEnView1.Proc.SkewDetectionFine( 0, 0.1, 10, True );
ImageEnView1.Proc.RotateAndCrop( d, ierBicubic );
See Also
◼SkewDetection
◼CalcOrientation
◼getTextAngle
◼OCR_GetOrientation