Class BarCodeConfidence

java.lang.Object
com.aspose.barcode.barcoderecognition.BarCodeConfidence

public final class BarCodeConfidence extends 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 final int
    Recognition confidence of barcode (mostly 1D barcodes) with weak checksumm or even without it.
    static final int
    Recognition confidence of barcode where codetext was not recognized correctly or barcode was detected as posible fakeBarCodeExtendedParameters
    static final int
    Recognition confidence which was confirmed with BCH codes like Reed–Solomon.
  • Method Summary

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • NONE

      public static final int NONE

      Recognition confidence of barcode where codetext was not recognized correctly or barcode was detected as posible fakeBarCodeExtendedParameters

      See Also:
    • 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:
    • 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: