This project has moved and is read-only. For the latest updates, please go here.

Detecting empty pages in scanned Tiff

Apr 14, 2016 at 1:06 AM

Is there a way to detect if an image is empty ?

I am processing some scanned images and must remove the blank pages.

I made a method where I made a comparison between a blank image with the image scanned but I'm having problems with performance
MagickImage blankPagePattern = new MagickImage("blank.tiff");
MagickImageCollection newFile= new MagickImageCollection();
using (MagickImageCollection collection = new MagickImageCollection(scannedFile)){
    foreach (MagickImage img in collection) {
          double error = img.Compare(blankPagePattern, ErrorMetric.MeanErrorPerPixel);
          if (error > Convert.ToDouble(nsThreshold.Value)) {
There is a better way to do this?
Apr 14, 2016 at 8:56 PM
What do you consider a blank page? Can you add a link to blank.tiff on something like dropbox?