public final class BarCodeConfidence
extends java.lang.Object
Contains recognition confidence level
This sample shows how BarCodeConfidence changed, depending on barcode type//Moderate confidence BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.CODE_128, "12345"); generator.save("c:\\test.png"); BarCodeReader reader = new BarCodeReader("c:\\test.png", DecodeType.CODE_39_STANDARD, DecodeType.CODE_128); for(BarCodeResult result : reader.readBarCodes()) { System.out.println("BarCode Type: " + result.getCodeTypeName()); System.out.println("BarCode CodeText: " + result.getCodeText()); System.out.println("BarCode Confidence: " + result.getConfidence()); System.out.println("BarCode ReadingQuality: " + result.getReadingQuality()); } //Strong confidence BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.QR, "12345"); generator.save("c:\\test.png"); BarCodeReader reader = new BarCodeReader("c:\\test.png", DecodeType.CODE_39_STANDARD, DecodeType.QR); for(BarCodeResult result : reader.readBarCodes()) { System.out.println("BarCode Type: " + result.getCodeTypeName()); System.out.println("BarCode CodeText: " + result.getCodeText()); System.out.println("BarCode Confidence: " + result.getConfidence()); System.out.println("BarCode ReadingQuality: " + result.getReadingQuality()); }
Modifier and Type | Field and Description |
---|---|
static int |
MODERATE
Recognition confidence of barcode (mostly 1D barcodes) with weak checksumm or even without it.
|
static int |
NONE
Recognition confidence of barcode where codetext was not recognized correctly or barcode was detected as posible fake
|
static int |
STRONG
Recognition confidence which was confirmed with BCH codes like Reed–Solomon.
|
public static final int NONE
Recognition confidence of barcode where codetext was not recognized correctly or barcode was detected as posible fake
public static final int MODERATE
Recognition confidence of barcode (mostly 1D barcodes) with weak checksumm or even without it. Could contains some misrecognitions in codetext or even fake recognitions if is low
BarCodeResult.ReadingQuality
,
Constant Field Valuespublic static final int STRONG
Recognition confidence which was confirmed with BCH codes like Reed–Solomon. There must not be errors in read codetext or fake recognitions