VeryPDF Deskew SDK, How to deskew an image? Straighten and Deskew Scanned Image files. Skew Detection and Correction. Skew angle detection and correction in an image

VeryPDF Deskew SDK can be downloaded from following web page,

https://www.verypdf.com/app/papertools/try-and-buy.html
https://www.verypdf.com/dl2.php/papertoolssdk.zip

VeryPDF Deskew SDK (API) allows the automatic skew detection and correction in scanned or faxed images. The skew is the inevitable slope present in the images acquired by scanners using an ADF (automatic document feeder) or received by fax. Straightening the images is a very important pre-processing step for improving the compression rate, the visualization aspect, the line-removal and the accuracy using ICR/OCR.

image

While other libraries usually allow users to deskew only monochrome images, VeryPDF Deskew SDK allows you to deskew both gray-scale and color images!

Using interpolation in skew correction, the aliasing due to the rotation is minimized and really perfect images are obtained (as rotating the paper!).

image

You can use following C# source code to deskew image files,

string appPath = Path.GetDirectoryName(Application.ExecutablePath);
System.Type VeryPDFType = System.Type.GetTypeFromProgID("VeryPDF.PaperToolsCom");
VeryPDF.PaperToolsCom VeryPDFCom = (VeryPDF.PaperToolsCom)System.Activator.CreateInstance(VeryPDFType);

string appFolder = Path.GetDirectoryName(Application.ExecutablePath);
string strFolder = Directory.GetParent(appFolder).FullName;

string strReturn = "";
int nFileIndex = 0;
VeryPDFCom.EnableDebugLog(true);

string strInFile = strFolder + "\\sample\\test_table_ocr.tif";
string strOutFile = strFolder + "\\sample\\output\\_output_" + nFileIndex.ToString() + ".png";
string strCmd = "-$ XXXXXXXXXXXXXXXXXX -deskew \"" + strInFile + "\" \"" + strOutFile + "\"";
strReturn = strReturn + VeryPDFCom.PaperTools(strCmd);

string strInFile = strFolder + "\\sample\\test_table_ocr.tif";
string strOutFile = strFolder + "\\sample\\output\\_output_" + nFileIndex.ToString() + ".png";
string strCmd = "-$ XXXXXXXXXXXXXXXXXX -deskew2 \"" + strInFile + "\" \"" + strOutFile + "\"";
strReturn = strReturn + VeryPDFCom.PaperTools(strCmd);

If you encounter any problem with VeryPDF Deskew SDK, please feel free to let us know.

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *


Verify Code   If you cannot see the CheckCode image,please refresh the page again!