Measure image rotation
Visual Basic |
---|
Public Function MeasureRotation() As EPageRotation |
If image contains enough of textual elements ciRotNone, ciRotUpsideDown, ciRotLeft, and ciRotRight values are set. If image contains mostly graphical objects, like lines, return values are ciRotPortrait and ciRotLeftOrRight.
Level of confidence in percent is set in rConfidence.
Measure Skew and Rotation
VB Sample (Visual Basic) | Copy Code |
---|---|
Public Sub T_MeasureSkewAndRotation(ByRef Tools As CiTools) Dim nSkew, eRot nSkew = Tools.MeasureSkew Debug.Print "Skew=" & nSkew & " Confidence=" & Tools.rConfidence & "%" eRot = Tools.MeasureRotation Debug.Print "Rotation=" & _ Switch(eRot = ciRotUnknown, "Unknown", _ eRot = ciRotNone, "None", _ eRot = ciRotLeft, "TurnedLeft", _ eRot = ciRotRight, "TurnedRight", _ eRot = ciRotUpsideDown, "UpsideDown", _ eRot = ciRotLeftOrRight, "TurnedLeftOrRight", _ eRot = ciRotPortrait, "Portrait") & _ " Confidence=" & Tools.rConfidence & "%" End Sub |