This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Tuesday, June 14, 2005 11:16:52 AM(UTC)
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
#2
Posted
:
Tuesday, June 14, 2005 11:59:01 AM(UTC)
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.
#3
Posted
:
Friday, June 17, 2005 6:11:53 AM(UTC)
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.