BarCodeResult

BarCodeResult class

Stores recognized barcode data like SingleDecodeType type, string codetext, BarCodeRegionParameters region and other parameters

public class BarCodeResult : joint.BaseJavaClass

Constructors

NameDescription
BarCodeResult(object)Initializes a new instance of the BarCodeResult class.

Methods

NameDescription
deepCloneCreates a copy of BarCodeResult class.
equals(object)Returns a value indicating whether this instance is equal to a specified BarCodeResult value.
getCodeBytesGets the encoded code bytes Value: The code bytes of the barcode.
getCodeText(object)Gets the code text with encoding.
getCodeTypeGets the barcode type Value: The type information of the recognized barcode.
getCodeTypeNameGets the name of the barcode type Value: The type name of the recognized barcode.
getConfidenceGets recognition confidence level of the recognized barcode Value: BarCodeConfidence.Strong does not have fakes or misrecognitions, BarCodeConfidence.Moderate could sometimes have fakes or incorrect codetext because this confidence level for barcodews with weak cheksum or even without it…
getExtendedGets extended parameters of recognized barcode Value: The extended parameters of recognized barcode.
getReadingQualityGets the reading quality. Works for 1D and postal barcodes. Value: The reading quality percent.
getRegionGets the barcode region Value: The region of the recognized barcode.
hashCodeReturns the hash code for this instance.
init
toStringReturns a human-readable string representation of this BarCodeResult.

Fields

NameDescription
extended
region

Examples

//This sample shows how to obtain BarCodeResult.
let generator = new BarcodeGenerator(EncodeTypes.Code128, "12345");
generator.save("test.png");
let reader = new BarCodeReader("test.png", null,  [ DecodeType.CODE_39, DecodeType.CODE_128 ]);
let results = reader.readBarCodes();
for(let i = 0; i < results.length; i++)
{
let result = results[i];
console.log("BarCode Type: " + result.getCodeTypeName());
console.log("BarCode CodeText: " + result.getCodeText());
console.log("BarCode Confidence: " + result.getConfidence());
console.log("BarCode ReadingQuality: " + result.getReadingQuality());
console.log("BarCode Angle: " + result.getRegion().getAngle());
}

See Also