ImageEn, unit imageenproc |
|
TImageEnProc.CalcOrientation
Declaration
function CalcOrientation(): Integer;
Description
Find the correct orientation for a textual image. It is mainly used to detect whether to adjust a document from portrait to landscape.
Notes:
- Apply only to document images (images with text)
- CalcOrientation can only detect 0° or 90° orientation. It cannot detect upside down, inverted text.
Demo
| Demos\ImageEditing\EveryMethod\EveryMethod.dpr |
Example
// Load test image
ImageEnView1.IO.LoadFromFile( 'D:\TestImage.jpg' );

// Automatically rotate a document
n := ImageEnView1.Proc.CalcOrientation();
ImageEnView1.Proc.Rotate( n );

See Also
-
SkewDetectionFine-
SkewDetection