VeryPDF Lines Removal SDK library allows tofrom images. Both vertical and horizontal lines can be removed from every kind of forms.
The removal of lines is a very important pre-processing step before using ICR/OCR and recognizing characters from the acquired document.
Removes horizontal and vertical black lines from 1 bit images. After removing the lines, any intersecting characters or other image content will be reconstructed as accurately as possible.
C# example tofrom scanned 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;
string strInFile = strFolder + "\\sample\\test_table_ocr.tif";
string strOutFile = strFolder + "\\sample\\output\\_output_" + nFileIndex.ToString() + ".png";
string strCmd = "-$ XXXXXXXXXXXXXXXXXX -removelongline 0 -boxobjects \"" + strInFile + "\" \"" + strOutFile + "\"";
strReturn = strReturn + VeryPDFCom.PaperTools(strCmd);
This is original scanned image with tables (horizontal and Vertical lines),
After removed horizontal and Vertical lines from the image, you will get a clean image with text contents only,
VeryPDF Lines Removal SDK can be downloaded from following web page,
If you encounter any problem with VeryPDF Lines Removal SDK, please feel free to let us know,