How to Use Blank Page Detection on Scanned Documents

Are all of these blank pages?

Blank page detection is an important step in most document imaging workflows. For example, it can be used to help end-users make sure they have their paper facing the correct way and inform them when they’ve done something wrong. For a more automated solution, blank pages can be removed to save on disk space and bandwidth.

However, the difficulty with blank page detection is that it can be a bit subjective. Humans can quickly perceive a blank page because we see that the page doesn’t have any text on it. But what does a computer do with a text-less page with lines, noise, borders and the like?

LEADTOOLS accounts for these discrepancies and provides an extremely accurate and configurable blank page detection algorithm. Its flags include options for detecting lines, noise, setting specific margins and more.

//create a new command
BlankPageDetectorCommand blankPageCom = new BlankPageDetectorCommand();
//default flags are DetectEmptyPage | DontIgnoreBleedThrough | DontDetectLinedPage | 
//                  DontUseActiveArea | UseDefaultMargins
blankPageCom.Flags = SetFlags(); 
blankPageCom.LeftMargin = (int)leftMarginUpDown.Value;
blankPageCom.RightMargin = (int)rightMarginUpDown.Value;
blankPageCom.TopMargin = (int)topMarginUpDown.Value;
blankPageCom.BottomMargin = (int)bottomMarginUpDown.Value;

MessageBox.Show(string.Format("Is Blank: {0}", blankPageCom.IsBlank));

For a complete example, check out the original forum post.

This entry was posted in Document Imaging and tagged , , , , , , . Bookmark the permalink.

Leave a Reply

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