#include "BIBRW1D.H"
int CALLBACK AutomaticReadHorVerBarCode (
HANDLE hDIB,
LPRECT pRect,
BYTE nDirection,
char * cCoding,
char * cValue,
float * fpScore)
Description
This function reads and decodes a horizontal or vertical, unknown type of barcode within the given range of the input image and returns the detected type and the decoded value. Decoded values always contain the checksum characters if available. This function works for only monochrome, 8 bit per pixel and 24 bit per pixel images. (The 8 bit per pixel and 24 bit per pixel images are converted into monochrome, using adaptive thresholding method.) Horizontal barcode read/decode functions always assume that the barcode to decode is horizontal and the reading direction is left to right. For further information about the input buffers, see the Horizontal and Vertical Reading/Decoding section of this manual.
Parameters
|
HDIB |
hDIB |
Handle of the input DIB. |
|
LPRECT |
pRect |
A rectangle specifying the area of the image where the barcode is. If all of the pRect values are zero, or pRect is NULL, the whole image is scanned. |
|
BYTE |
nDirection |
This parameter specifies the orientation of the barcode to read. Available values: BARCODE_LEFT_TO_RIGHT (0) The orientation of the rectangle is horizontal, from the left to the right. BARCODE_RIGHT_TO_LEFT (1) The orientation of the rectangle is horizontal, from the right to the left. BARCODE_TOP_TO_BOTTOM (2) The orientation of the rectangle is vertical, from the top to the bottom. BARCODE_BOTTOM_TO_TOP (3) The orientation of the rectangle is vertical, from the bottom to the top. |
|
char * |
cCoding |
A string buffer where the coding constant is written into. The buffer must be allocated and freed up by the user, and has to contain enough space for the coding constant. For possible values see the Constant values and structures section. |
|
char * |
cValue |
A string buffer where the decoded value is written into. The buffer must be allocated and freed up by the user, and has to contain enough space for the decoded value. |
|
float * |
fpScore |
A float buffer where the score value is written into. The buffer must be allocated and freed up by the user. Score is a value that shows the sureness of decoding. Score is between 0.0 (low sureness) and 100.0 (high sureness). |
Return values
0 on success or an error code on failure. For possible values see the Barcode Error codes.
Programming notes
None
Requirements
Header : Declared in BIBrw1d.h; include BIBrw1d.h.
Library : Use BIBrw1d.lib (32 bit version) or BIBrw1dx.lib (64 bit version).
DLLs : BIBrw1d.dll (32 bit version) or BIBrw1dx.dll (64 bit version).