• Post Reply Bookmark Topic Watch Topic
  • New Topic

Detecting blank page

 
Raj Purohit
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Currently I am working on web scanning project in which I have to get the documents from the scanner and save them in form of TIFF files (either single page or multi-page). As an enhancement to this project, I have to detect and eliminate blank pages. Can anybody please tell me how to detect blank pages/images??
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Normally I'd say if the image has only white pixels, but that'll probably never be true in the case of scanned images. Maybe if the average pixel intensity is above 90%/95%/99% of clear white?
 
Raj Purohit
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good idea!! but the image may contain some noise and the problem is that we can't eliminate entire noise. your idea is right but it won't give desired results
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Noise is exactly what is addressed by my comment. Do you understand what I mean by "average pixel intensity in % of clear white"?
 
Raj Purohit
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have found the solution to the problem.

Blank images will have highly uniform pixel values throughout the whole image. To measure the degree of uniformity (or variability), I came up with the function that calculates the standard deviation of all pixel values. An image is determined to be blank if the standard deviation falls below a certain threshold.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!