Analyzing barcode reading results
In This Topic
Used terms
- Symbol is unsolved - symbol is not a symbol of barcode symbology.
- Symbol is read - symbol is a symbol of barcode symbology.
- Symbol is recognized - symbol was read and approved by checksum.
- Confidence - probability, in percents, that barcode is recognized correctly.
- Minimal confidence - barcodes with confidence less or equal this value are ignored by the library. Default value is 95.
- Barcode is unsolved - there are many unread or unsolved symbols. Confidence is less or equal 50.
- Barcode is read - there are some unrecognized or unread symbols. Confidence is more 50 and less or equal 95.
- Barcode is recognized - all symbols of barcode were recognized. Confidence is 99 or more.
Getting results
The
BarcodeReader.ReadBarcodes method returns an array of
IBarcodeInfo objects.
Each element of this array contains the results of a single recognized barcode.
Example: Here is an example that shows how to get information about recognized barcodes.
// read barcodes
Vintasoft.Barcode.IBarcodeInfo[] infos = barcodeReader.ReadBarcodes(filename);
// get information about extracted barcodes if barcodes are detected
foreach(Vintasoft.Barcode.IBarcodeInfo info in infos)
System.Console.WriteLine(string.Format("Barcode type: {0}, value: {1}", info.BarcodeType, info.Value));
' read barcodes
Dim infos As Vintasoft.Barcode.IBarcodeInfo() = barcodeReader.ReadBarcodes(filename)
' get information about extracted barcodes if barcodes are detected
For Each info As Vintasoft.Barcode.IBarcodeInfo In infos
System.Console.WriteLine(String.Format("Barcode type: {0}, value: {1}", info.BarcodeType, info.Value))
Next
Confidence
Each recognized barcode has a
IBarcodeInfo.Confidence value.
Here is a list of possible confidence values for 1D barcodes:
0% |
Barcode is unsolved, there are some unsolved symbols |
50% |
Barcode is read, all symbols are read but some of symbols are not recognized, checksum is not correct |
100% |
Barcode is recognized, all symbols of barcode are recognized, checksum is correct |
NA (101%) |
Barcode is recognized/read, all symbols of barcode are recognized/read, checksum cannot be checked because this barcode type does not have checksum |
Here is a list of possible confidence values for 2D barcodes:
0 - 10% |
Barcode is unsolved, start symbol of barcode is read, data area and area of the error correction cannot be read |
10.1 - 50% |
Barcode is unsolved, there are unrecognized or unsolved symbols in data area, area of the error correction or first line of barcode cannot be read |
50.1 - 95% |
Barcode is read, there are unrecognized or unsolved symbols in data area and/or area of the error correction, the error correction algorithm cannot correct symbols |
99% |
Barcode is recognized, there were unrecognized symbols in data area and/or area of the error correction but symbols were corrected with the error correction algorithm, checksum is correct |
100% |
Barcode is recognized, all symbols from data area and error correction area are recognized, checksum is correct |
You can set the minimum confidence value with the
ReaderSettings.MinConfidence
property and ignore unnecessary ("bad") barcodes.