DTWAIN Extended Image Information Constants

Top  Previous  Next

The following constants are used for querying extended image information.  When retrieving the information the Value Type describes the data type that your application must use to retrieve the values.

 

Bar Code Information

 

Constant

Value

Value Type

Description

 

DTWAIN_EI_BARCODECOUNT

4608

LONG

Returns the number of bar codes found on the document image. A value of 0 means the bar code engine was enabled but that no bar codes were found. A value of -1 means the bar code engine was not enabled.

 

DTWAIN_EI_BARCODECONFIDENCE

4634

LONG

This number reflects the degree of certainty the bar code engine has in theaccuracy of the information obtained from the scanned image and ranges from 0 (no confidence) to 100 (supreme confidence). The Source may return a value of -1 if it does not support confidence reporting.

 

DTWAIN_EI_BARCODEROTATION

4635

LONG

The bar code's orientation on the scanned image is described in reference to a Western-style interpretation of the image.

 

DTWAIN_EI_BARCODETEXTLENGTH

 

4636

LONG

The number of ASCII characters derived from the bar code.

 

DTWAIN_EI_BARCODETEXT

 

4610

LPCTSTR

The text of a bar code found on a page.

 

DTWAIN_EI_BARCODEX

 

4608

LONG

The X coordinate of a bar code found on a page.

 

DTWAIN_EI_BARCODEY

 

4609

LONG

The Y coordinate of a bar code found on a page.

 

DTWAIN_EI_BARCODETYPE

 

4611

LONG

The type of bar code found on a page.

 

 

Shaded Area Detection and Removal

Constant

 

Value

Value Type

Description

DTWAIN_EI_DESHADECOUNT

4637

LONG

Returns the number of shaded regions found and erased in the document image. A value of 0 means the deshade engine was enabled but that no regions were processed. A value of -1 means the deshade engine was not enabled.The top coordinate of a shaded region found on a page.

 

DTWAIN_EI_DESHADETOP

 

4612

LONG

The top coordinate of a shaded region found on a page.

DTWAIN_EI_DESHADELEFT

 

4613

LONG

The left coordinate of a shaded region found on a page.

 

DTWAIN_EI_DESHADEHEIGHT

 

4614

LONG

The height of a shaded region found on a page.

DTWAIN_EI_DESHADEWIDTH

 

4615

LONG

The width of a shaded region found on a page.

DTWAIN_EI_DESHADESIZE

 

4616

LONG

The width of the dots within the shade region.

DTWAIN_EI_DESHADEBLACKCOUNTOLD

 

4638

LONG

The total number of black pixels in the region prior to deshading. If this value is unknown the Source returns -1.

 

DTWAIN_EI_ DESHADEBLACKCOUNTNEW

 

4639

LONG

The total number of black pixels in the region after deshading. If this value is unknown the Source returns -1.

 

DTWAIN_EI_ DESHADEBLACKRLMIN

 

4640

LONG

The shortest black pixel run-length in the region prior to deshading. If this value is unknown the Source returns -1.

 

DTWAIN_EI_ DESHADEBLACKRLMAX

 

4641

LONG

The longest black pixel run-length in the region prior to deshading. If this value is unknown the Source returns -1.

 

DTWAIN_EI_ DESHADEWHITECOUNTOLD

 

4642

LONG

The total number of white pixels in the region prior to deshading. If this

value is unknown the Source returns -1.

 

DTWAIN_EI_ DESHADEWHITECOUNTNEW

4643

LONG

The total number of white pixels in the region after deshading. If this

value is unknown the Source returns -1.

 

DTWAIN_EI_ DESHADEWHITERLMIN

 

4644

LONG

The shortest white pixel run-length in the region prior to deshading. If this value is unknown the Source returns -1.

 

DTWAIN_EI_ DESHADEWHITERLAVE

 

4645

LONG

The average length of all white pixel run-lengths in the region prior to

deshading. If this value is unknown the Source returns -1.

 

DTWAIN_EI_ DESHADEWHITERLMAX

 

4646

LONG

The longest white pixel run-length in the region prior to deshading. If this value is unknown the Source returns -1.

 

 

Speckle Removal

Constant

Value

Value Type

Description

 

DTWAIN_EI_SPECKLESREMOVED

4617

LONG

The number of speckles removed from the image when de-speckle is enabled.

 

DTWAIN_EI_BLACKSPECKLESREMOVED

 

4647

LONG

The number of black speckles removed from the image when despeckle is enabled.

 

DTWAIN_EI_WHITESPECKLESREMOVED

 

4648

LONG

The number of white speckles removed (black speckles added) from the image when despeckle is enabled.

 

 

Horizontal Line Detection

 

Constant

Value

Value Type

Description

 

DTWAIN_EI_HORZLINECOUNT

4649

LONG

Returns the number of horizontal lines found and erased in the document

image. A value of 0 means the line removal engine was enabled but that

no lines were found. A value of -1 means the line engine was not enabled.

 

DTWAIN_EI_HORZLINEXCOORD

 

4618

LONG

The x coordinate of a horizontal line detected in the image.

DTWAIN_EI_HORZLINEYCOORD

 

4619

LONG

The y coordinate of a horizontal line detected in the image.

DTWAIN_EI_HORZLINELENGTH

 

4620

LONG

The length of a horizontal line detected in the image.

 

DTWAIN_EI_HORZLINETHICKNESS

 

4621

LONG

The thickness (height) of a horizontal line detected in the image.

 

 

Vertical Line Detection

Constant

Value

Value Type

Description

 

DTWAIN_EI_VERTLINECOUNT

 

4650

LONG

Returns the number of vertical lines found and erased in the document

image. A value of 0 means the line removal engine was enabled but that

no lines were found. A value of -1 means the line engine was not enabled.

 

DTWAIN_EI_VERTLINEXCOORD

 

4622

LONG

The x coordinate of a vertical line detected in the image.

 

DTWAIN_EI_VERTLINEYCOORD

 

4623

LONG

The y coordinate of a vertical line detected in the image.

 

DTWAIN_EI_VERTLINELENGTH

 

4624

LONG

The length of a vertical line detected in the image.

 

DTWAIN_EI_VERTLINETHICKNESS

 

4625

LONG

The thickness (width) of a vertical line detected in the image.

 

 

 

Patch Code Detection

 

 

Constant

Value

Value Type

Description

 

DTWAIN_EI_PATCHCODE

 

4626

LONG

The patch code detected.

 

Skew Detection

 

 

Constant

Value

Value Type

Description

 

DTWAIN_EI_DESKEWSTATUS

 

4651

LONG

Returns the status of the deskew operation.

 

DTWAIN_EI_SKEWORIGINALANGLE

 

4652

LONG

The amount of skew in the original image.

 

DTWAIN_EI_SKEWFINALANGLE

 

4653

LONG

The amount of skew in the deskewed image. This number may not be zero.

 

DTWAIN_EI_SKEWCONFIDENCE

 

4654

LONG

This number reflects the degree of certainty the deskew engine has in the

accuracy of the deskewing of the current image and ranges from 0 (no

confidence) to 100 (supreme confidence). The Source may return a value of

-1 if it does not support confidence reporting.

 

DTWAIN_EI_SKEWWINDOWX1

 

4655

LONG

This is the X image coordinate of the upper left corner of the virtual

deskewed image. It may be negative indicating the deskewed corner is not

represented by actual pixels.

DTWAIN_EI_SKEWWINDOWY1

 

4656

LONG

This is the Y image coordinate of the upper left corner of the virtual

deskewed image. It may be negative indicating the deskewed corner is not

represented by actual pixels.

DTWAIN_EI_SKEWWINDOWX2

 

4657

LONG

The X image coordinate of the upper right corner of the virtual deskewed

image.

DTWAIN_EI_SKEWWINDOWY2

 

4658

LONG

The Y image coordinate of the upper right corner of the virtual deskewed

image.

DTWAIN_EI_SKEWWINDOWX3

 

4659

LONG

This is the X image coordinate of the lower left corner of the virtual

deskewed image. It may be negative indicating the deskewed corner is not

represented by actual pixels.

 

DTWAIN_EI_SKEWWINDOWY3

 

4660

LONG

This is the Y image coordinate of the lower left corner of the virtual

deskewed image. It may be negative indicating the deskewed corner is not

represented by actual pixels.

 

DTWAIN_EI_SKEWWINDOWX4

 

4661

LONG

The X image coordinate of the lower right corner of the virtual deskewed image.

 

DTWAIN_EI_SKEWWINDOWY4

 

4662

LONG

The Y image coordinate of the lower right corner of the virtual deskewed image.

 

 

Endorsed Text

Constant

Value

Value Type

Description

 

DTWAIN_EI_ENDORSEDTEXT

4627

LPTSTR

(At least 255 characters)

The text that was endorsed on the paper by the scanner.

 

 

Forms Recognition

Constant

Value

Value Type

Description

 

DTWAIN_EI_FORMCONFIDENCE

4628

LONG

The confidence that the specified form was detected. This is an array property with a confidence factor for each form In the data set with 0 meaning no match and 100 meaning absolute certainty. Typically values over 70 imply a good form match with the template.

 

DTWAIN_EI_FORMTEMPLATEMATCH

 

4629

LPTSTR

(at least 255 characters)

The array of file names for the master forms matched against a form. If multi-page master forms are used, the associated page numbers are contained in the FORMTEMPLATEPAGEMATCH capability array.

 

DTWAIN_EI_FORMTEMPLATEPAGEMATCH

 

4630

LONG

An array containing the number of the page from a multi-page master form matched against a form image. It is useful when matching a form image against the pages of a multi-page master form. The file name of the master form is contained in the FORMTEMPLATEMATCH capability.

 

DTWAIN_EI_FORMHORZDOCOFFSET

 

4631

LONG

An array containing the perceived horizontal offsets of the form image being matched against a set of master forms. This is useful for page registration once the form has been recognized.

 

DTWAIN_EI_FORMVERTDOCOFFSET

 

4632

LONG

An array containing the perceived vertical offsets of the form image being matched against a set of master forms. This is useful for page registration once the form has been recognized.

 

 

Twain 1.9 Extended Attributes

Constant

Value

Value Type

Description

 

DTWAIN_EI_BOOKNAME

4664

LPTSTR

(at least 255 characters)

This is new with TWAIN 1.9, expanding on the document/page/frame numbers described by previous versions of TWAIN in the TW_IMAGELAYOUT structure. The ordering is

book/chapter/document/page(camera)/frame, and increases the detail of image addressing that a Source can provide for an Application. TWAIN 1.9 Sources that support extended image info must provide this information, even if the value is always fixed at 1.

 

DTWAIN_EI_CHAPTERNUMBER

4665

LONG

This is new with TWAIN 1.9, expanding on the document/page/frame numbers described by previous versions of TWAIN in the TW_IMAGELAYOUT structure. The ordering is

book/chapter/document/page(camera)/frame, and increases the detail of image addressing that a Source can provide for an Application. TWAIN 1.9 Sources that support extended image info must provide this information, even if the value is always fixed at 1.

 

DTWAIN_EI_DOCUMENTNUMBER

 

4666

LONG

This is new with TWAIN 1.9, expanding on the document/page/frame numbers described by previous versions of TWAIN in the TW_IMAGELAYOUT structure. The ordering is

book/chapter/document/page(camera)/frame, and increases the detail of image addressing that a Source can provide for an Application. TWAIN 1.9 Sources that support extended image info must provide this information, even if the value is always fixed at 1.

 

DTWAIN_EI_PAGENUMBER

 

4667

LONG

This is new with TWAIN 1.9, expanding on the document/page/frame numbers described by previous versions of TWAIN in the TW_IMAGELAYOUT structure. The ordering is

book/chapter/document/page(camera)/frame, and increases the detail of image addressing that a Source can provide for an Application. TWAIN 1.9 Sources that support extended image info must provide this information, even if the value is always fixed at 1.

 

DTWAIN_EI_CAMERA

 

4668

LPTSTR

(at least 255 characters)

The primary use of this value is to determine if the image is from the top or the bottom side of a sheet of paper. This is accomplished by naming the camera that was used to obtain the image.

DTWAIN_EI_ FRAMENUMBER

 

4669

LONG

TWAIN 1.9 Sources that support extended image info must provide this information.

 

DTWAIN_EI_ FRAME

4670

DTWAIN_FRAME

TWAIN 1.9 Sources that support extended image info must provide this information.

 

DTWAIN_EI_ PIXELFLAVOR

4671

LONG

This value must correctly describe the pixel flavor of the current image, the same data that is available through DTWAIN_CV_ICAPPIXELFLAVOR. TWAIN 1.9 Sources that support extended image info must provide this information.