DetectOrientation Method of the FRPage Object
This method detects text orientation on the image. The method returns TextOrientation object, if orientation has been detected successfully, and NULL, if the program failed to detect orientation.
Syntax
C++
HRESULT DetectOrientation( IOrientationDetectionParams* OrientationParams, IObjectsExtractionParams* ExtractionParams, IRecognizerParams* RecognizerParams, ITextOrientation** Result );
C#
ITextOrientation DetectOrientation( IOrientationDetectionParams OrientationParams, IObjectsExtractionParams ExtractionParams, IRecognizerParams RecognizerParams );
Visual Basic .NET
Function DetectOrientation( _ [OrientationParams As IOrientationDetectionParams = Nothing], _ [ExtractionParams As IObjectsExtractionParams = Nothing], _ [RecognizerParams As IRecognizerParams = Nothing] _ ) As ITextOrientation
Parameters
- OrientationParams
- [in] This variable refers to the OrientationDetectionParams object that stores parameters of orientation detection. This parameter may be 0. In this case, the default parameters are used, or, if a profile has been loaded, the parameters set by this profile are used.
- ExtractionParams
- [in] This variable refers to the ObjectsExtractionParams object that stores parameters of objects extraction. This parameter may be 0. In this case, the objects are extracted with default parameters, or, if a profile has been loaded, the parameters set by this profile are used.
- RecognizerParams
- [in] This variable refers to the RecognizerParams object that stores parameters of page recognition. This parameter may be 0. In this case, the default parameters are used, or, if a profile has been loaded, the parameters set by this profile are used.
- Result
- [out, retval] A pointer to ITextOrientation* pointer variable that receives the interface pointer of the TextOrientation output object. This object provides access to the text orientation on the page. If orientation detection failed, NULL is returned.
Return values
This method has no specific return values. It returns the standard return values of ABBYY FineReader Engine functions.
Samples
C# code
The method is used in the following demo tools: Camera OCR, Image Preprocessing.
See also
9/17/2024 3:14:40 PM