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, November 4, 2009 9:37:59 AM(UTC)
nicholas.witham

Groups: Registered
Posts: 8


So currently we have an old scanning program we built doing regular twain scanning.

I was looking to upgrading this. We use Fujitsu FI-5530C2 or FI-4530C scanners. These are tray fed scanners.

Now is fast twain significantly faster then regular and does it have the ... overall same functionality? I have lead tools 16 and we need to scan an image at a set size, with 100 dpi and color one side and b/w on the back.

We are looking into using jpg2000 format, are there any others that may be superior? We will be converting them back to jpg once they hit our servers as we have imaging software that only seems to work with jpg's.

Sorry i am just trying to find the best way to create a fast/stable program and have it use the least bandwidth possible.
 

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 : Thursday, November 5, 2009 6:54:14 AM(UTC)

Adam Boulad  
Guest

Groups: Guests
Posts: 3,022

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

Our Fast Twain features improve batch scanning by making the most of the Twain driver's capabilities. For example, if the scanner and its driver support hardware compression, it can be used instead of software compression. Also, if they are faster in one transfer mode than the others, that is detected by our functions. However, if your code is going to change the settings for each page side (keep jumping between color to black and white and back), this will not enable you to make use of the full features. In general, Fast Twain works when you want to scan a very large number of pages together, all using the same settings (batch).

If the volume of your scanning is not large, regular LEADTOOLS Twain functions might be enough.

About saving the images as JPEG2000 (J2K) then converting them to JPEG, this might not be a good idea.
J2K can give you a very high compression ratio with reasonable quality, but it is a lossy compression format. This means it will lose some image details depending on the compression ratio or quality factor you choose. Also, common JPEG is a lossy format too, so when you de-compress J2K then compress it using JPEG, you will lose some other details of the image because the 2 compression algorithms are different.

Unless your images are huge, you might want to compress them as JPEG from the start.

About black and white images, it's better to save them in some bitonal format instead of JPEG. In general, TIFF CCITT Group4 Fax is very common and gives good results for b/w images.

 
#3 Posted : Thursday, November 5, 2009 12:26:08 PM(UTC)
nicholas.witham

Groups: Registered
Posts: 8


hmmm okay awesome that helps a lot.

We save the back as b/w because it contains non-important information most of the time so yes... i could save that as a tiff that's no big deal then convert to jpeg when it hits the office.

Is there any image format you can suggest that i can convert back to jpeg's when they hit my office? It is... unfortanutely not an option right now to be using any format other than jpeg once it hits the office.

Also yeah it's not that lead tools is slow but we scan about 100,000 images per month and usually get a rush at the beginning of the month getting... 40,000 in the period of a few days. My idea behind it was faster we can scan then the better cause hitting the scanners max speed would be nice.

Thanks for all your help this is definatily helping my project along nicely. I am currently working on building the scanning portion so if we can figure out something for saving it would be wonderful.


Oh PS. We save most images @ 100dpi and a few @200dpi. Some of the scanning locations are on very very slow connections so we are trying to get the smallest format(possibly smaller then jpeg) and converting back even if we suffer minimal image loss.
 
#4 Posted : Thursday, November 5, 2009 12:49:10 PM(UTC)
nicholas.witham

Groups: Registered
Posts: 8


i hate to double post but i cannot edit.

We are going to be using lossless j2k's. We can get a 200dpi image @ 600kb while our jpeg counterpart is usually about 1.7mb

Tiff's will be the back image.

I guess fast twain isn't an option so i won't be using it. @ 200dpi even if we have to convert we won't lose too much image quality at that resolution and if we do we can always bump it up a little bit.
 
#5 Posted : Sunday, November 8, 2009 5:47:07 AM(UTC)

Adam Boulad  
Guest

Groups: Guests
Posts: 3,022

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

If the speed and quality you're getting from this approach are good enough for your needs, you might want to stay with this approach for now.

If you feel you need to speed the scanning phase, we might be able to suggest improvements depending on how you currently do it. If you'd like to discuss that, please tell me how exactly do you scan now:
1. Do you supply the scanner with a large number of sheets and scan them all in one run?
2. Do you scan all pages as color, then convert the backside to b/w to save space? This applies if your scanner supports 2-sided scanning at the same time.
 
#6 Posted : Monday, November 9, 2009 8:42:12 AM(UTC)
nicholas.witham

Groups: Registered
Posts: 8


Yeah that is exactly how it works. We scan batches of images in bundles of 1 to 50 images. Usually closer to 50 for most.

The Back is currently converted to TIFF, which is will stay i guess as it's the best option. The front is a 100 or 200dpi jpg image.

I am using the test twain scanner program and running into significant issues hopefully you can help me with.

I scan an image and choose the save option. I have tried to save a lossless j2k(jpeg 2000) image but the size is... very large. I have tried saving a less quality but it is still significantly larger then a jpeg.

As much as i hate to compare we are using a program call scandall to test manually and it saves a lossless j2k file @ 600kb. If we choose 200dpi it lowers down to about 200kb.

Why is it the twain with lead tools seems to inflate the size so much? I have tried changing the settings in the save dialog but nothing seems to alter the image size.

Any ideas?
 
#7 Posted : Tuesday, November 10, 2009 5:35:18 AM(UTC)

Adam Boulad  
Guest

Groups: Guests
Posts: 3,022

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

Nicholas,
Since most of your scanning is done in batches, using Fast Twain might help speed the overall process.
If you would like to pursue that, check our Fast Twain demo and see if the scanner's driver benefits from the optimizations we do for the full color scanning type.
You can then go back and convert the back side images to 1-bit using our LEADTOOLS load/save functions.

Please note that the Fast Twain functionality is only available in Document/Medical toolkit.
The regular Twain functionality is available in all toolkits.

The J2K compression is a different issue, so please open a new forum thread or support ticket by sending an email to support@leadtools.com.
If you do that, please send us a sample image saved through the other application? Please put your attachment in a ZIP or RAR file.

 
#8 Posted : Thursday, November 12, 2009 6:51:55 AM(UTC)
nicholas.witham

Groups: Registered
Posts: 8


Okay thanks i got the correct thing working.

I am confused on how fast twain is working? It seems everything for scanning is using the regular twain drivers.

I try selecting Fast Twain from the drop down and i just keep getting "document capability required"... on a demo?

Secondly included is my source for how i am running the current twain. Yes it is a little messy but i have yet to clean it up i want to get twain functional and then segregate things once it's all working.

The biggest issue right now is the buffer is taking a fair bit of time to load and save the files so i am not sure how fast twain will help.

Any info would be wonderful thanks. I will keep cracking away at this but currently fast twain doesn't want to work on the demo when i select it.

Thanks,
 
#9 Posted : Thursday, November 12, 2009 7:34:29 AM(UTC)
nicholas.witham

Groups: Registered
Posts: 8


sorry for the double post i cannot edit ARG

here is the code for the main form, i keep getting an error trying to upload the project.
File Attachment(s):
Form_RemoteScan.zip (8kb) downloaded 29 time(s).
 
#10 Posted : Thursday, November 12, 2009 7:54:21 AM(UTC)
nicholas.witham

Groups: Registered
Posts: 8


sorry for triple post... haha

Anyways is there any way to bulk save the images right at the end? I did some testing and the twain driver runs quite fast if i am not saving.

If i can bulk scan 40 images and then save the back + front at the end it would alleviate any problems i am having.

I understand how to do it but how to code it is a little trickier. I will keep looking in the time being however
 
#11 Posted : Sunday, November 15, 2009 4:39:02 AM(UTC)

Adam Boulad  
Guest

Groups: Guests
Posts: 3,022

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

Yes, Fast Twain uses the same Twain drivers as regular Twain. The difference is in the optimizations performed to try to find the best performance for transfer and compression combinations supported by the driver.
Regular Twain uses whatever the default for the driver is.

About Fast Twain demos not working, you can only use these features if you have a LEADTOOLS Document Imaging or Medical Imaging toolkit. If you only have Imaging Pro, Fast Twain will be locked.
Of course, if you're using the Evaluation edition, everything is enabled (unlocked) to let you try it.

About the code you posted, it doesn't appear to be using Fast Twain at all. You're only calling the regular TwainSession.Acquire() method.

The TwainSession.Acquire() method alone doesn't save the images to disk, so you must call RasterCodec.Save() in the TwainSession.AcquirePage event handler.
If this is slowing down the scanning, try to use a format other than RasterImageFormat.Jp2 because JPEG2000 compression is processor-intensive and can be a bit slow for large images.

If you have Document Imaging and want to use Fast Twain, you will NOT need to call the Save method because the Fast Twain function (TwainSession.AcquireFast Method) internally saves the scanned images to the disk location you specify.

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