Generally, there are two ways to automatically deskew an image with Dynamic .NET TWAIN.
double Angle; Angle = m_ImageCore.ImageProcesser.GetSkewAngle(m_ImageCore.ImageBuffer.CurrentImageIndexInBuffer);
m_ImageCore.ImageProcesser.Rotate(m_ImageCore.ImageBuffer.CurrentImageIndexInBuffer, -Angle, true, Dynamsoft.Core.Enums.EnumInterpolationMethod.BestQuality);
If you want to do de-skew to each scanned image, you can call the above code in
Option 2: Use custom capability of the scanner, which requires the support of the scanner itself.
You can use CapSet functionality and the code is as follows, ```c# m_TwainManager.Capability = (Dynamsoft.TWAIN.Enums.TWCapability)4433; //AutoDeskew m_TwainManager.CapType = Dynamsoft.TWAIN.Enums.TWCapType.TWON_ONEVALUE; m_TwainManager.CapValue = 0; bool bRet = m_TwainManager.CapSet(); ```
If you need any assistance or have any problem, please feel free to contact email@example.com.
This page is compatible for:
In this article: