Welcome Guest! To enable all features, please Login or Register.



Last Go to last post Unread Go to first unread post
#1 Posted : Thursday, August 9, 2007 4:57:21 AM(UTC)

Groups: Registered
Posts: 3


We are using LeadTools 14.6 DLL API.

We want to detect and remove the blank page. Please provide me support to find the right API and formula. 





Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Saturday, August 11, 2007 10:50:38 PM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

Was thanked: 1 time(s) in 1 post(s)


To detect blank pages, you need create a region that consists of a range of white colors. Then check to see how many pixels are NOT(setnot) in this range
If this number is less than .5% of the total number of pixels in the image, we consider the page blank.
You can play with the values for the lower/upper limits and the percentage for different thresholds
The following code shows how to detect blank pages using API programming interface:
COLORREF lowerColor, upperColor;
L_INT nRet;
L_UINT32 dwArea;

lowerColor = RGB(200, 200, 200);
upperColor = RGB(255, 255, 255);
nRet = L_SetBitmapRgnColorRGBRange(pBitmap, lowerColor, upperColor, L_RGN_SETNOT);
L_GetBitmapRgnArea(pBitmap, &dwArea);
If (dwArea / (ImageWidth * ImageHeight)) < 0.005
// this is a Blank Image
// this is not a Blank Image

Maen Badwan
LEADTOOLS Technical Support
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.055 seconds.