Go to: Contents |
Native Library API Reference |
Functions
FineRecognizeBarcode Function
This function recognizes an image of a barcode.
Consider also using the
FineExtractBarcodes function, which can recognize more than one barcode
on the image.
C Syntax
TFineErrorCode FineRecognizeBarcode(
const CFineImage* image,
DWORD allowedTypes,
DWORD allowedOrientations,
DWORD allowedSupplements,
int hasChecksum,
int isCode39WithoutAsterisk,
int isBinaryInterpretedAsText,
TFineSupportedCodepage defaultCodePage,
WCHAR unknownLetter,
CFineBarcode** resultBuff,
TFineProgressCallbackFunction progressCallback
);
Parameters
- image
- [in] The image to be recognized as a
CFineImage variable.
- allowedTypes
- [in] The OR combination of the TFineBarcodeType constants
that define acceptable barcode types.
- allowedOrientations
- [in] The OR combination of the TFineBarcodeOrientation
constants that define the possible orientations of the barcode.
- allowedSupplements
- [in] The OR combination of the TFineBarcodeSupplement
constants
that define the possible supplements of the barcode. This parameter is
ignored for barcodes without supplement. Set the parameter to FBS_Void if the barcode
you recognize does not have a supplement.
- hasChecksum
- [in] Should not be zero if the barcode should be recognized as a barcode with checksum.
It is valid for Code39, Interleaved25, Codabar, and Matrix25 barcodes. For
these types of the barcodes, the last symbol of the barcode is considered as
control sum of all barcode symbols, and is checked during the recognition.
- isCode39WithoutAsterisk
- [in] Should not be zero if the Code39 barcode has no start and stop symbol, the asterisk
"*". It is valid for Code39 barcode. This parameter is ignored if the
allowedTypes parameter set to more than one type.
- isBinaryInterpretedAsText
- [in] Should not be zero if byte data should be interpreted as text in the current code
page. If this parameter is zero the data will be stored in hexadecimal
format. This parameter is ignored if the allowedTypes parameter set
to more than one type.
- defaultCodePage
- [in] A TFineSupportedCodepage
constant that specifies a default code page. If barcode was created using
code page that differs from the specification code page, that code page
should be specified in this parameter. This parameter is ignored if the allowedTypes
parameter set to more than one type.
- unknownLetter
- [in] A character that is written instead of unrecognized symbol or binary
zero. Also it indicates unsuccessful recognition result.
- resultBuff
- [out] A pointer to pointer variable that receives the interface pointer of
a CFineBarcode variable that contains the
recognition results. This pointer must be released afterwards with the help of the
FineFreeMemory function. If the function
fails to recognize the image as a barcode, this parameter contains a character
specified in the unknownLetter parameter with
FTCQ_Min quality and have
FBT_Unrecognized type in the
Type property.
- progressCallback
- [in] The pointer to the TFineProgressCallbackFunction
callback function that delivers the progress information.
It can be 0.
Return value
The function returns the standard return values of ABBYY Mobile OCR Engine functions.
See also
TFineBarcodeType
TFineBarcodeOrientation
TFineBarcodeSupplement