Class BarCodeConfidence
- java.lang.Object
-
- com.aspose.barcode.barcoderecognition.BarCodeConfidence
-
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("test.png"); BarCodeReader reader = new BarCodeReader("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("test.png"); BarCodeReader reader = new BarCodeReader("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()); }
-
-
Field Summary
Fields Modifier and Type Field 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 fakestatic int
STRONG
Recognition confidence which was confirmed with BCH codes like Reed–Solomon.
-
-
-
Field Detail
-
NONE
public static final int NONE
Recognition confidence of barcode where codetext was not recognized correctly or barcode was detected as posible fake
- See Also:
- Constant Field Values
-
MODERATE
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
- See Also:
BarCodeResult.ReadingQuality
, Constant Field Values
-
STRONG
public 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
- See Also:
- Constant Field Values
-
-