VeryPDF Lines Removal SDK: Removing Unwanted Lines from Images

VeryPDF Lines Removal SDK: Removing Unwanted Lines from Images.

VeryPDF Lines Removal SDK is a powerful library that enables users to remove unwanted lines from various forms, including both vertical and horizontal lines. This pre-processing step is crucial before using ICR/OCR to recognize characters from scanned documents.

VeryPDF PaperTools COM/SDK:

https://www.verypdf.com/app/papertools/index.html

image

With this library, users can specify various options to fine-tune the process, such as the mode (horizontal, vertical, or both), minimum and maximum line sizes, maximum number of blank pixels that can interrupt a line, reconnection of lines and characters that cross a removed line, and cleaning of isolated pixels along the borders of a removed line.

To use this library, users simply need to supply a monochrome DIB (Device Independent Bitmap) to process. The removal procedure is fast and accurate, ensuring that users can obtain the best results in a timely manner.

In addition to removing unwanted lines, users can also use VeryPDF's deskew library to correct any inclination of the scanned images. This can further enhance the quality and accuracy of the output.

The following is a sample application in Microsoft Visual C++ using VeryPDF Lines Removal SDK:

    string strInFile = strFolder + "\\sample\\test_table_ocr.tif";
     string strOutFile = strFolder + "\\sample\\output\\_output_" + intToString(nFileIndex) + ".png";
     string strCmd = "-$ XXXXXXXXXXXXXXXXXX -removelongline 0 -boxobjects \"" + strInFile + "\" \"" + strOutFile + "\"";
     printf("%s\n", strCmd.c_str());
     strReturn = strReturn + VeryPDFCom.PaperTools(strCmd.c_str());
     nFileIndex = nFileIndex + 1;
    
     strInFile = strFolder + "\\sample\\test_black_border1.jpg";
     strOutFile = strFolder + "\\sample\\output\\_output_" + intToString(nFileIndex) + ".tif";
     strCmd = "-$ XXXXXXXXXXXXXXXXXX -removelongline 0 \"" + strInFile + "\" \"" + strOutFile + "\"";
     printf("%s\n", strCmd.c_str());
     strReturn = strReturn + VeryPDFCom.PaperTools(strCmd.c_str());
     nFileIndex = nFileIndex + 1;
    
     strInFile = strFolder + "\\sample\\test_despeckle.tif";
     strOutFile = strFolder + "\\sample\\output\\_output_" + intToString(nFileIndex) + ".tif";
     strCmd = "-$ XXXXXXXXXXXXXXXXXX -removeshortline 5 \"" + strInFile + "\" \"" + strOutFile + "\"";
     printf("%s\n", strCmd.c_str());
     strReturn = strReturn + VeryPDFCom.PaperTools(strCmd.c_str());
     nFileIndex = nFileIndex + 1;
    
     strInFile = strFolder + "\\sample\\test_despeckle.tif";
     strOutFile = strFolder + "\\sample\\output\\_output_" + intToString(nFileIndex) + ".tif";
     strCmd = "-$ XXXXXXXXXXXXXXXXXX -removeshortline 3 -removelongline 0 \"" + strInFile + "\" \"" + strOutFile + "\"";
     printf("%s\n", strCmd.c_str());
     strReturn = strReturn + VeryPDFCom.PaperTools(strCmd.c_str());
     nFileIndex = nFileIndex + 1;
    
     strInFile = strFolder + "\\sample\\test_line.png";
     strOutFile = strFolder + "\\sample\\output\\_output_" + intToString(nFileIndex) + ".tif";
     strCmd = "-$ XXXXXXXXXXXXXXXXXX -removelongline 200 \"" + strInFile + "\" \"" + strOutFile + "\"";
     printf("%s\n", strCmd.c_str());
     strReturn = strReturn + VeryPDFCom.PaperTools(strCmd.c_str());
     nFileIndex = nFileIndex + 1;
    
     strInFile = strFolder + "\\sample\\test_table_ocr.tif";
     strOutFile = strFolder + "\\sample\\output\\_output_" + intToString(nFileIndex) + ".tif";
     strCmd = "-$ XXXXXXXXXXXXXXXXXX -removelongline 100 \"" + strInFile + "\" \"" + strOutFile + "\"";
     printf("%s\n", strCmd.c_str());
     strReturn = strReturn + VeryPDFCom.PaperTools(strCmd.c_str());
     nFileIndex = nFileIndex + 1;
    
     strInFile = strFolder + "\\sample\\test_skew.tif";
     strOutFile = strFolder + "\\sample\\output\\_output_" + intToString(nFileIndex) + ".tif";
     strCmd = "-$ XXXXXXXXXXXXXXXXXX -removelongline 0 \"" + strInFile + "\" \"" + strOutFile + "\"";
     printf("%s\n", strCmd.c_str());
     strReturn = strReturn + VeryPDFCom.PaperTools(strCmd.c_str());
     nFileIndex = nFileIndex + 1;

VeryPDF Lines Removal SDK is a valuable tool for anyone who needs to process scanned documents and remove unwanted lines. With its user-friendly options and fast, accurate performance, this library can greatly improve the efficiency and effectiveness of your document processing tasks.

➤ Want to buy this product from VeryPDF?

Should you be interested in acquiring a license for our product or require assistance in developing a custom software solution based on it, please do not hesitate to reach out to us. Our team is always ready to assist you and provide you with the necessary support.

http://support.verypdf.com/

We look forward to the opportunity of working with you and providing developer assistance if required.

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!