Here is a revised patch to automatically select blank (or dark) pages. It uses Image::Magick::Statistics() to determine the mean and standard deviation for each page. This version of the patch will analyze those pages which have changed since the last analysis was performed. A page is considered to have changed if any of the following transformations have been performed: rotate, threshold, negate, unsharp, crop.
The code has some hooks for future work regarding automatically selecting pages whose OCR text needs to be updated. These functions are currently not accessible to the user.
This patch is meant to be applied to the HEAD (tip) of the repository.