ClearImage .NET API
MeasureSkew Method (CiTools)
Example 





Inlite.ClearImage Namespace > CiTools Class : MeasureSkew Method
Measure image skew
Syntax
'Declaration
 
Public Function MeasureSkew() As System.Double
'Usage
 
Dim instance As CiTools
Dim value As System.Double
 
value = instance.MeasureSkew()
public System.double MeasureSkew()
public function MeasureSkew(): System.Double; 
public function MeasureSkew() : System.double;
public:
System.double MeasureSkew(); 

Return Value

The returned value is in the range from -45 degrees to 45 degrees.   If the value is negative, the image is skewed counterclockwise.
Remarks

Measures image or zone skew relative to the nearest vertical or horizontal axis. 
rConfidence property contains confidence level in percents.

Example
void MeasureSkewRotation(string imageFile)
{
    // Open image file
    CiServer ci = Inlite.ClearImageNet.Server.GetThreadServer();
    CiTools Tools = ci.CreateTools();
    Tools.Image.Open(imageFile, 1);
    // Do processing
    double skew; EPageRotation rot;
    skew = Tools.MeasureSkew();
    Console.WriteLine("Skew= " + skew + "   Confidence= " + Tools.rConfidence + "%");
    rot = Tools.MeasureRotation();
    Console.WriteLine("Rotation= " + rot.ToString() + "   Confidence=" + Tools.rConfidence + "%");
}
Sub MeasureSkewRotation(imageFile As String)
    ' Open image file
    Dim ci As CiServer = Inlite.ClearImageNet.Server.GetThreadServer()
    Dim Tools As CiTools = ci.CreateTools()
    Tools.Image.Open(imageFile, 1)
    ' Do processing
    Dim skew As Double, rot As EPageRotation
    skew = Tools.MeasureSkew()
    Console.WriteLine("Skew= " + skew + "   Confidence= " + Tools.rConfidence + "%")
    rot = Tools.MeasureRotation()
    Console.WriteLine("Rotation= " + rot.ToString() + "   Confidence=" + Tools.rConfidence + "%")
End Sub
See Also

Reference

CiTools Class
CiTools Members
MeasureSkew Method
MeasureRotation Method
rConfidence Property