ImageGear23.Recognition Assembly > ImageGear.Recognition Namespace > ImGearRecImage Class : DetectSkew Method |
'Declaration Public Sub DetectSkew( _ ByRef slope As Integer, _ ByRef orientation As ImGearRecOrientationMode _ )
'Usage Dim instance As ImGearRecImage Dim slope As Integer Dim orientation As ImGearRecOrientationMode instance.DetectSkew(slope, orientation)
public void DetectSkew( out int slope, out ImGearRecOrientationMode orientation )
public: void DetectSkew( [PARAMFLAG::Out] int slope, [PARAMFLAG::Out] ImGearRecOrientationMode orientation )
public: void DetectSkew( [Out] int slope, [Out] ImGearRecOrientationMode orientation )
Depending on the current setting of the Image deskewing and Image rotation modes, this method returns either with the detected image skew / orientation or with the current values of these settings.
When the image is not bitonal, in some rare cases Preprocess method can deskew the image more accurately than DetectSkew / Deskew methods. This is because DetectSkew
uses a simpler and faster binarization algorithm than the Preprocess
. The latter can realize that the calculated slope value is unreliable and then binarize the image again with a more precise method and repeat the skew detection.