ClearImage COM Server
MeasureRotation Method
See Also  Example  Send Feedback
CiTools Object : MeasureRotation Method

Description

Measure image rotation

Syntax

Visual Basic
Public Function MeasureRotation() As EPageRotation

Return Type

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.

Remarks

Level of confidence in percent is set in rConfidence.

Example

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

See Also

© 1992-2011. Inlite Research, Inc. All Rights Reserved.