High-Speed Image Acquisition

Top  Previous  Next

The TWAIN protocol has capabilities to support high-speed image acquisition.  However, the actual support for high-speed acquisition is highly dependent on the TWAIN driver of the particular TWAIN device.

 

The following is a guideline of getting the most from a high-speed TWAIN device using DTWAIN.

 

First and most important, the application should use buffered mode to acquire an image (DTWAIN_AcquireBuffered, DTWAIN_AcquireBufferedEx).  The other modes (DTWAIN_AcquireNative or DTWAIN_AcquireFile using DTWAIN to generate the images) may not take advantage of the rated speed of your scanner.

 

The image types acquired should be black/white (1 bit per pixel).  Color images require more memory and time to transfer.  Calling DTWAIN_AcquireBuffered or DTWAIN_AcquireBufferedEx using the DTWAIN_PT_BW setting for the pixel type to use should be done if black/white images are acquired

 

The TWAIN driver should support acquiring images with no user-interface.  Also, the support for the non user-interface mode should be robust enough to be functional.  Note that many TWAIN drivers allow you to acquire images with no user interface, but do not function 100% correctly using this mode.  To acquire with no user interface, call DTWAIN_AcquireBuffered or DTWAIN_AcquireBufferedEx with a FALSE value for the user-interface parameter.

 

The application should check if compression is supported for buffered transfers, and if so, what types of compressions are supported (DTWAIN_EnumCompressionTypes, DTWAIN_IsCompressionSupported, DTWAIN_SetCompressionType).  If the compression is supported, the application should set the compression before calling DTWAIN_AcquireBuffered.

 

The application should control the size of the image strips being sent to DTWAIN.  To do this, please refer to Using a user-defined memory buffer for more information.  Setting the strip size is important to how many passes the scanner will need to make when acquiring an image in strips of data.  In addition, the user-defined memory buffer ensures that DTWAIN will not do any unnecessary processing of the image strips, and instead, send the strips of data straight to your application.

 

The application should enable the feeder if possible (DTWAIN_EnableFeeder).

 

The application should enable the autoscan feature if possible (DTWAIN_EnableAutoScan).  You must enable the auto-scan feature when setting the number of pages to buffer (see next item)

 

The application should check for the "maximum batch buffers" capability (DTWAIN_IsMaxBuffersSupported, DTWAIN_EnumMaxBuffers, and set the capability with an appropriate value (DTWAIN_SetMaxBuffers).

 

Please note that some of these capabilities may not be available with your device's TWAIN driver.  DTWAIN cannot do anything beyond what the TWAIN driver supports.  If the device claims to be a high-speed device, but does not have those capabilities supported by their TWAIN driver, then this is the fault of the manufacturer, and inquiries should be directed to the producer of the TWAIN device.