What path could be followed to try to detect 'blank pages' from a PDF made of raster image pages?
We're talking about 1bit images here.
I'm just asking for ideas or hints, I'll dig the details.
Detecting what would qualify as a blank page?
Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan
- Tracker Supp-Stefan
- Site Admin
- Posts: 17810
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: Detecting what would qualify as a blank page?
Hello Omascia,
If you are certain that all pages will contain only raster image data and nothing else - you can export those images using the PDF Tools SDK, and then perform your checks on whether or not those images are "empty".
If the file can contin other elements (e.g. annotations added later) - then you can try to use the Viewer Simple DLL SDK to rasterize the pages and draw them to a DC, and then handle the raster data from there on.
Regards,
Stefan
If you are certain that all pages will contain only raster image data and nothing else - you can export those images using the PDF Tools SDK, and then perform your checks on whether or not those images are "empty".
If the file can contin other elements (e.g. annotations added later) - then you can try to use the Viewer Simple DLL SDK to rasterize the pages and draw them to a DC, and then handle the raster data from there on.
Regards,
Stefan
Re: Detecting what would qualify as a blank page?
Thanks a lot Stefan. Though I'd say these steps I knew about them. The intent of my question was a bit broader (though reading my text, yes that was not so clear) and about image processing tricks usually used to classify a page content (represented as a raster image) as blank. I see there is a forum for Image-XChange, I'll rephrase there, it'll be more on topic. Again, thank you.
- Tracker Supp-Stefan
- Site Admin
- Posts: 17810
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: Detecting what would qualify as a blank page?
Hello omascia,
Yes you can post there as well, but I do not think there are any ready built algorithms we can provide that will help you in your endeavour. We could provide the tools, but you will have to implement the logic to determine when a page is considered empty (e.g. more than 99% of the pixels are white).
Regards,
Stefan
Yes you can post there as well, but I do not think there are any ready built algorithms we can provide that will help you in your endeavour. We could provide the tools, but you will have to implement the logic to determine when a page is considered empty (e.g. more than 99% of the pixels are white).
Regards,
Stefan
Re: Detecting what would qualify as a blank page?
Understood. I have some ideas of how to do it anyway and how to dismiss non significant pixels first. Was checking if there was a known golden path with ImageXChange 4 before re-inventing the wheel.
Again thanks for these quick answers.
Again thanks for these quick answers.
- Tracker Supp-Stefan
- Site Admin
- Posts: 17810
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: Detecting what would qualify as a blank page?
Hi omascia,
Glad to hear you have some ideas on your own, and sorry that I could not help further!
Regards,
Stefan
Glad to hear you have some ideas on your own, and sorry that I could not help further!
Regards,
Stefan