VeryPDF Lines Removal SDK library allows to remove lines from images. Both vertical and horizontal lines can be removed from every kind of forms.
https://www.verypdf.com/app/papertools/try-and-buy.html#buy
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 to remove lines from 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;
VeryPDFCom.EnableDebugLog(true);
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,
https://www.verypdf.com/app/papertools/try-and-buy.html#buy
https://www.verypdf.com/dl2.php/papertoolssdk.zip
If you encounter any problem with VeryPDF Lines Removal SDK, please feel free to let us know,
http://support.verypdf.com/open.php