loading
 
Detecting "empty" page
Kresimir Majdenic from Germany  [1 posts]
2 year
Can you point me into right direction how to detect if an image of a paper (scan) is empty or not. Algorithm does not need to handle all possible cases but it has to be fast (less than 200 ms).
Here I attach an example of such image (empty one).

 
Steven Gentner from United States  [1446 posts] 2 year
Kresimir,

It will largely depend on what it looks like when there is a minimal amount of text on the page. For example, you can use the Color_Statistics module which will run in about 40ms and generate a bunch of variables about the image. One could just use MIN_INTENSITY and as long as that is higher than say 30 that could indicate an empty page. But even one black pixel would cause that to be close to zero. So maybe a better indicator is to allow some black (i.e. noise) on the page.

So instead I may use NORMALIZED_SUM_G and check if that value is < 0.85 to at least ensure there is more than just noise pixels on the page but you will have to test a bit to see what value works best for you.

Keep in mind that a pure blank page is all white at an intensity of 255 while and all black page is 0.

STeven.

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index