Dynamically Suppress Orientation Detection for Full Page OCR
17340
QAID # 17340 Published
Question / Problem:
Dynamically Suppress Orientation Detection for Full Page OCR
Answer / Solution:
The Automatic Rotation option for Full Page OCR applies to the entire project. It is not possible to switch off orientation for single classes.
The following script shows a workaround, which allows you to switch off orientation detection for OCR. The use of the script requires that you can classify the document without OCR, e.g. layout classifier.
Private Sub Document_AfterClassifyXDoc(pXDoc As CASCADELib.CscXDocument) Dim i As Long If pXDoc.ExtractionClass = "MyClass" Then change orientation for all pages from unknown to NoRotation this will prevent the OCR from doing orientation detection For i = 0 To pXDoc.CDoc.Pages.Count - 1 pXDoc.CDoc.Pages(i).Rotation = Csc_RT_NoRotation Next i End If End Sub
Applies to:
Product | Version | Category |
---|---|---|
AXPRO |
4.0 |
Configuration |
AXPRO |
4.5 |
Configuration |
AXPRO |
5.0 |
Configuration |
AXPRO |
5.5 |
Configuration |