Home › Forums › TWAIN Classic › Detecting and discarding blank pages
- This topic has 1 reply, 2 voices, and was last updated 11 years, 9 months ago by Amil.
- AuthorPosts
Hi.
I don’t know where is a better place to do that question and where I receive quicker answer so I’ve posted here and to “TWAIN Specification Discussion”. Sorry about that.I’m using a Fujitsu fi-5530C scanner with Twain drivers installed. I’m looking for a way how to detect and discard blank pages during duplex-scanning. In some older Twain specification was a note about ICAP_AUTODISCARDBLANKPAGES capability but now this capability isn’t supported (am I right? I’ve read that it was removed in version 1.8 ) I need a solution for detecting these blank pages – do I simply have to count percentage of white pixels in scanned document? And if so – how can I do that with Twain help?
Many thanks for the answers.
I know this is several years after your post, but I will post anyways (for future searchers).
First of all, according to the latest twain.h and TWAIN 2.1 spec, ICAP_AUTODISCARDBLANKPAGES was added (readded?) in TWAIN 2.0.
My Fujitsu 5120c also claims to support ICAP_AUTODISCARDBLANKPAGES, but it does not work because I am using an older TWAIN 1.7 DLL (even though setting it to TWBP_AUTO does not cause TWAIN to complain).
Thus, the only solution for my application is to analyze the sheet image to determine whether it is blank or not. Since I am working in black-and-white (1bpp), all I do is count the percentage of black pixels in the image. If it is above 1.5%, I consider the sheet not blank. This threshold value will differ based on the types of sheets you are scanning (3-5% for my sheets).
- AuthorPosts