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 : Wednesday, October 1, 2008 7:32:56 AM(UTC)
aallasudheer

Groups: Registered
Posts: 18


Hi,

We are using .NET 15, C#

I need to check if the scanner is currently doing duplex scanning, if yes I need to know which page it is currently scanning (Front or back of page) in AcquirePage event, is there a way to determine that? Can you please point me an example?

Thanks,

Sudheer

 

 

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 : Friday, October 3, 2008 7:58:39 AM(UTC)

GregR  
GregR

Groups: Registered, Tech Support, Administrators
Posts: 764


You can check to see whether Duplex is enabled by calling TwainSession.GetCapability to check the current value of DuplexEnabled. 

If it is true, then odd pages will be the front side and even pages will be the back side.  To get the page number, just create a global int that you increment each time the Acquirepage event fires because it will fire twice for every duplex page (first the front, then the back).
 
#3 Posted : Friday, October 3, 2008 10:23:00 AM(UTC)
aallasudheer

Groups: Registered
Posts: 18


Thank  You, we are getting backside of the page in reverse order (Like attached) because of the way it is printed, to straighten this I am using 'RotateViewPerspective' is this correct or is there a better way of doing this? One more thing is we need to remove the black edges around the image and straighten the image, can you please suggest us best approach for this.

Thanks,

Sudheer

 

aallasudheer attached the following image(s):
TestFile.gif
 
#4 Posted : Monday, October 6, 2008 4:35:41 AM(UTC)

GregR  
GregR

Groups: Registered, Tech Support, Administrators
Posts: 764


RotateViewPerspective is a good choice.  It is the fastest way to rotate an image in 90 degree increments.

DeskewCommand will straighten the image, and the BorderRemoveCommand will remove the black edges.  You can find examples for both of these classes in the .NET help file.
 
#5 Posted : Monday, October 6, 2008 7:12:24 AM(UTC)
aallasudheer

Groups: Registered
Posts: 18


Thanks Greg, Ducument says BorderRemoveCommand only supports black and white images, we are scanning docs in grey scale, can you please suggest if there is any other command that does this for grey scale images?

Thanks,

Sudheer

 

 
#6 Posted : Tuesday, October 7, 2008 4:59:30 AM(UTC)

GregR  
GregR

Groups: Registered, Tech Support, Administrators
Posts: 764


All document clean-up functions will only work with 1bpp images.  However, they should also provide information about what is selected for cleaning up and the option to not actually change the image.  The BorderRemoveCommand has the Region property and the SingleRegion flag.  If you use this flag the Region property will contain a Windows region and then you can use that in RasterImage.AddGdiPlusRegionToRegion on your non-1bit image and then fill it with white (or whatever your background color is).  For an example, take a look at the documentation for the BorderRemoveCommand.Region property.

Another approach would be to change the image and then subtract the original from the result in some manner to get a mask of what changed which you can create a region of on your non-1bit image.  Either way, you will have to make a 1bit copy of your image and then apply the changes to your non-1bit image.
 
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.083 seconds.