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

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Tuesday, June 14, 2005 11:16:52 AM(UTC)
martin_Smalley

Groups: Registered
Posts: 4


Found the example on this site to remove blank pages which works great for B&W (text/photos) images at any resolution, however when you scan using Grayscale or color at any resolution, it always finds a region and fails to report a pure blank page as being blank. Does anyone have any ideas? I tried Mean/Average to try and remove any dust specs, but that didn't help even with a brand new pure white page.....cleaned the glass too :) Maybe convert the Grayscale to B&W and retest?

'**  scanning an ImageList (Images)  for blanks

With LEAD1

       For tempint = Images.Count - 1 To 0 Step -1

               .BitmapList = 0

               .InsertBitmapListItem -1, Images.Item(tempint).BitMap

              .SetRgnColor RGB(255, 255, 255), L_RGN_SETNOT

              .RgnFrameColor = vbRed

             .RgnFrameType = RGNFRAME_STATIC

             If .GetRgnArea = 0 Then

                  Images.Remove (tempint)

             End If

       Next

End With

 

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 : Tuesday, June 14, 2005 11:59:01 AM(UTC)

Gabe  
Gabe

Groups: Registered, Tech Support
Posts: 46


Thank you for your interest in LEAD and LEADTOOLS.
I am not sure which version of LEADTOOLS you are using. See if you have the SetRgnColorRGBRange. If so, you can use that method to specify a range of values to set in the region.
Also, you may be able to adjust the GetRgnArea check to be greater than 0. For example, you could use a percentage of the image instead of a hardcoded value:
If .GetRgnArea/(.BitmapWidth * .BitmapHeight) < .05Then '5% of the image.
Another idea is to Threshold the image first. This will make near white, white and near black, black. Take a look at the IntensityDetect method.
Hope this helps,

Edited by moderator Thursday, March 30, 2017 1:20:04 PM(UTC)  | Reason: Not specified

Gabe
Developer Support
LEAD Technologies, Inc.

LEAD Logo
 
#3 Posted : Friday, June 17, 2005 6:11:53 AM(UTC)
martin_Smalley

Groups: Registered
Posts: 4


Worked great! Thanks for the info.

 
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.066 seconds.