This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Wednesday, December 2, 2009 7:49:50 PM(UTC)
Groups: Registered
Posts: 7
Hi, I'm using .net Visual Studio 2008, i want to implement functionality through which when i scan the image it drop the color (RED, BLUE or GREEN) as well as it save the image in multi pages i.e. page 1 will contain the drop out image and page 2 will contain the full actuall image with all colors.
basically i want to do OCR on the image and thats why i need only black part of the image.
please guide me through example ASAP
#2
Posted
:
Thursday, December 3, 2009 9:10:22 AM(UTC)
Groups: Manager, Tech Support
Posts: 367
Was thanked: 1 time(s) in 1 post(s)
Naveed,
Are you using Twain scanning?
Some Twain sources support a capability called ICAP_FILTER that
controls which color in the image to subtract or drop while scanning.
If your scanner support this capability, you can use our Twain functions to set its value.
If the scanner doesn't support it, you can scan at full color then use
LEADTOOLS image processing functions to remove the color range you
don't want. One way to do that is to define a region based on a color
range (either RGB or HSV color range), then fill the region with
background color (such as white).
The exact details depend on which LEADTOOLS version (15, 16, etc.) and
programming interface (Main OCX, .NET classes, DLL API, C++ Classes,
etc.) you are using.
Amin Dodin
Senior Support Engineer
LEAD Technologies, Inc.
#3
Posted
:
Thursday, December 3, 2009 8:07:25 PM(UTC)
Groups: Registered
Posts: 7
Hey Amin,
currently me using .net and import dlls e.g. leadtools.dll and other dll's which are needed .. im using C# as a dev language.
there are 2 functionality we require
1. Only scan the black ink portion of the image and then after that we can combine that image with the overlay image whenever we want to show it
2. Second we want to save Tiff file with two pages. first page will contain the black portion of the scanned image and second page will contain the whole scanned image
here are some code lines
TwainCapability twCap = new TwainCapability();
twCap.Information.ContainerType = TwainContainerType.Array;
twCap.Information.Type = TwainCapabilityType.ImageImageFilter;
twCap.ArrayCapability.ItemType = TwainItemType.Uint16;
twCap.ArrayCapability.Count = 1;
twCap.ArrayCapability.SetValue(0, TwainCapabilityValue.FilterRed);
this is for filtering red color,
i tried to figure out that capability is supported or not using function TwainSession.GetCapability -
1. TwainCapabilityType.ImageImageFilter
2. TwainCapabilityType.ImageFilter
but it's showing message that capability is not supported
When we use TWAIN Device driver gui we can have these functionality but in our application we set light source, Color Filter, Software Drop Out color using application gui and then i want to get scanned image according to the parameter set using that gui.
I'm using Kodak i30 Scanner
#4
Posted
:
Thursday, December 3, 2009 8:12:35 PM(UTC)
Groups: Registered
Posts: 7
i'm using LeadTools version 16.5
Thanx!
#5
Posted
:
Sunday, December 6, 2009 4:55:17 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
Does your scanner driver support setting these capabilities? You can check the ICAP_FILTER using Twacker application from the Twain working group?
If you don't have Twacker, you can use the following URL to download it:
http://www.twain.org/devfiles/twack.zip If you run the Twacker application, please do as follow:
1. From File menu select "Select Source" and choose your scanner driver.
2. From the Special Menu, select "Load\Open SM"
3. From the Special Menu, select "Open Source"
4. From the Special Menu, select "Send"
On the Send Dialog, please do as follow:
1. On the Capability combo box, select the "ICAP_FILTER" capability
2. After that click on the "Send" button.
3. On the MSG combo box, select the "MSG_SET", doing this will show 2 combo boxes at the bottom of the Send dialog
4. Choose the values you want to check if your twain driver support setting these value and click 'Send' button. Does it return success?
#6
Posted
:
Sunday, December 6, 2009 9:56:12 PM(UTC)
Groups: Registered
Posts: 7
i think scanner don't have the functionality.
how we can achieve color dropout, light source, color filter using LeadTools after getting the image from the scanner
#7
Posted
:
Monday, December 7, 2009 3:12:08 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
After you scan the image with full colors, you can apply the LEADTOOLS Image processing functions on it. Some of these processing functions are the following commands:
1. Select a region based on the color you want to remove. Do this using the AddColorRgbRangeToRegion or AddColorHsvRangeToRegion functions
2. Fill the region with a background color (such as white) using the FillCommand class.
3. Repeat step 1 with a different color and call step 2 again.
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.