BX_BarcodeResult
The BX_analyze_dib, BX_analyze_file, and BX_analyze_bmp methods returns a populated BX_AnalyzeResult structure containing BarcodeResults array of objects. Each element of the BarcodeResults array contains the results of a single recognized barcode or unsolved barcode. (See ReturnPossibleBarcodes.)
// call BX_analyze_file, BX_analyze_dib, or BX_analyze_bmp to detect barcodes in the image
// all detected barcodes will be returned to the
// BarcodeResults object array.
BX_AnalyzeParameters params = BX_DefaultAnalyzeParameters;
BX_AnalyzeResult result;
BX_Status status;
status = BX_analyze_dib(¶ms, data, &result);
if( 0 == result.BarcodeResultsLength ) {
printf("No results\n");
BX_free_analyze_result( &result );
return;
}
for( int i=0; i<result.BarcodeResultsLength; ++i ) {
BX_BarcodeResult *res = &result.BarcodeResults[i];
printf("Result #%d\n", i+1);
printf("\tValue: %s\n", res->Value);
}
BX_free_analyze_result( &result );{color}
Order of Results
Since Barcode Xpress can return multiple barcode results from a single scan, the detected barcode results (both solved and unsolved) will be sorted using the following criteria. Note that all solved barcodes will be ordered before unsolved barcodes.
First, the confidence factor is used to sort the barcode results from highest confidence to lowest. The Confidence property gets the confidence of the barcode that was recognized.
Next, for any barcodes with the same confidence, they will then be sorted by their location, from top to bottom, then left to right.