#include "BIBRW1D.H"
int CALLBACK ReadSkewedCode128BarCode (
HANDLE hDIB,
LPRECT pRect,
char * cBuffer,
int * ipAngle,
float * fpScore)
Description
This function reads and decodes a skewed, Code128 type barcode in the given range of the input image and returns the detected type, decoded value and the detected orientation. 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.) Skewed barcode reader/decoder functions always assume that the barcode to decode is skewed and the reading direction is left to right. For further information see the Skewed 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. |
|
char * |
cBuffer |
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. |
|
int * |
ipAngle |
An integer buffer where the detected orientation is written into. The buffer must be allocated and freed up by the user. Orientation's unit is angle and is defined as the anlge in mathematics. It's from 0 degree to 359 degrees, and it's counter-clockwise. 0 degree is the normal horizontal barcode's angle assuming it's left to right coded. In case of having a right to left coded horizontal barcode, angle should be 180 degrees. |
|
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 Barcode Error codes.
Programming notes
Use the GetBarCodeOrientation function to detect the angle of deskew.
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).