Dev Center
Swift
Objective-C
Table of contents

Thanks for downloading Dynamsoft Barcode Reader Package!

Your download will start shortly. If your download does not begin, click here to retry.

Barcode Result Classes

TextResult

TextResult is the class that stores the text result data.

class com.dynamsoft.dbr.TextResult;
Attribute Type Descriptions
barcodeFormat int Barcode type in BarcodeFormat group 1.
barcodeFormatString String Barcode type in BarcodeFormat group 1 as string.
barcodeFormat_2 int Barcode type in BarcodeFormat group 2.
barcodeFormatString_2 String Barcode type in BarcodeFormat group 2 as string.
barcodeText String The barcode text, ends by ‘\0’.
barcodeBytes byte[] The barcode content in a byte array.
localizationResult LocalizationResult* The corresponding localization result.
detailedResult Object One of the following: QRCodeDetails, PDF417Details, DataMatrixDetails, AztecDetails, OneDCodeDetails.
results ExtendedResult[] The extended result array.
exception String The exception message.

Code Snippet

// Get the text result by decode methodes
TextResult[] textresult = barcodeReader.decodeBuffer(frame.getData(),frame.getWidth(),frame.getHeight(),frame.getStrides()[0],frame.getFormat(),"");

LocalizationResult

LocalizationResult is the extension of the class TextResult. It stores the localization result information.

class com.dynamsoft.dbr.LocalizationResult;
Attribute Type Description
terminatePhase int The terminate phase of localization result.
barcodeFormat int Barcode type in BarcodeFormat group 1.
barcodeFormatString String Barcode type in BarcodeFormat group 1 as string.
barcodeFormat_2 int Barcode type in BarcodeFormat group 2.
barcodeFormatString_2 String Barcode type in BarcodeFormat group 2 as string.
resultPoints Point[] The vertices coordinates information of the barcode region.
angle int The angle of a barcode. Values range is from 0 to 360.
moduleSize int The barcode module size (the minimum bar width in pixel).
pageNumber int The page number the barcode located in. The index is 0-based.
regionName String The region name the barcode located in.
documentName String The document name.
resultCoordinateType int The coordinate type.
accompanyingTextBytes byte[] The accompanying text content in a byte array.
confidence int The confidence of the localization result.

Code Snippet

if ( textresult != null && textresult.length != 0){
    for ( int i = 0; i< textresult.length; i++ ) {
        LocalizationResult localizationResult = textresult[i].localizationResult;
        // DO something on localization results.
    }
}

ExtendedResult

ExtendedResult is the extension of the class TextResult. It stores the extended result information.

class com.dynamsoft.dbr.ExtendedResult;
Attribute Type Description
resultType int The extended result type.
barcodeFormat int Barcode type in BarcodeFormat group 1.
barcodeFormatString String Barcode type in BarcodeFormat group 1 as string.
barcodeFormat_2 int Barcode type in BarcodeFormat group 2.
barcodeFormatString_2 String Barcode type in BarcodeFormat group 2 as string.
confidence int The confidence of the result. The higher confidence means the higher accuracy.
bytes byte[] The content in a byte array.
accompanyingTextBytes byte[] The accompanying text content in a byte array.
deformation int The deformation value.
detailedResult Object One of the following: QRCodeDetails, PDF417Details, DataMatrixDetails, AztecDetails, OneDCodeDetails.
samplingImage SamplingImageData The sampling image info.
clarity int The clarity of the barcode zone in percentage.

Code Snippet

if ( textresult != null && textresult.length != 0){
    for ( int i = 0; i < textresult.length; i++ ) {
        ExtendedResult[] extendedResult = textresult[i].results;
        // Do something on extended results.
    }
}

AztecDetails

AztecDetails is one of the detailedResult in class TextResult. It stores the Aztec code details.

class com.dynamsoft.dbr.AztecDetails;
Attribute Type Description
moduleSize int The barcode module size (the minimum bar width in pixel).
rows int The row count of the barcode.
columns int The column count of the barcode.
layerNumber int A negative number (-1, -2, -3, -4) specifies a compact Aztec code. A positive number (1, 2, .. 32) specifies a normal (full-rang) Aztec code.

Code Snippet

//The textresult[i] is one of the text result you got  
AztecDetails aztecDetails = (AztecDetails) textresult[i].detailedResult;

DataMatrixDetails

DataMatrixDetails is one of the detailedResult in class TextResult. It stores the DataMatrix code details.

class com.dynamsoft.dbr.DataMatrixDetails;
Attribute Type Description
moduleSize int The barcode module size (the minimum bar width in pixel).
rows int The row count of the barcode.
columns int The column count of the barcode.
dataRegionRows int The data region row count of the barcode.
dataRegionColumns int The data region column count of the barcode.
dataRegionNumber int The data region count.

Code Snippet

//The textresult[i] is one of the text result you got  
DataMatrixDetails dataMatrixDetails = (DataMatrixDetails) textresult[i].detailedResult;

OneDCodeDetails

OneDCodeDetails is one of the detailedResult in class TextResult. It stores the OneD code details.

class com.dynamsoft.dbr.OneDCodeDetails;
Attribute Type Description
moduleSize int The barcode module size (the minimum bar width in pixel).
startCharsBytes int The start chars in a byte array.
stopCharsBytes int The stop chars in a byte array.
checkDigitBytes int The check digit chars in a byte array.
startPatternRange int The start pattern range of the OneDcode.
middlePatternRange int The middle pattern range of the OneDcode.
endPatternRange int The end pattern range of the OneDcode.

Code Snippet

//The textresult[i] is one of the text result you got  
OneDCodeDetails oneDDetails = (OneDCodeDetails) textresult[i].detailedResult;

PDF417Details

PDF417Details is one of the detailedResult in class TextResult. It stores the PDF417 code details.

class com.dynamsoft.dbr.PDF417Details;
Attribute Type Description
moduleSize int The barcode module size (the minimum bar width in pixel).
rows int The row count of the barcode.
columns int The column count of the barcode.
errorCorrectionLevel int The error correction level of the barcode.

Code Snippet

//The textresult[i] is one of the text results you got  
PDF417Details pdf417Details = (PDF417Details) textresult[i].detailedResult;

QRCodeDetails

QRCodeDetails is one of the detailedResult in class TextResult. It stores the QRCode details.

class com.dynamsoft.dbr.QRCodeDetails;
Attribute Type Description
moduleSize int The barcode module size (the minimum bar width in pixels).
rows int The row count of the barcode.
columns int The column count of the barcode.
errorCorrectionLevel int The error correction level of the barcode.
version int The version of the QR Code.
model int Number of the models.

Code Snippet

//The textresult[i] is one of the text results you got  
QRCodeDetails qrDetails = (QRCodeDetails) textresult[i].detailedResult;

SamplingImageData

SamplingImageData stores the detailed image data in ExtendedResult.

class com.dynamsoft.dbr.SamplingImageData;
Attribute Type Description
bytes byte[] The sampling image data in a byte array.
width int The width of the sampling image.
height int The height of the sampling image.

Code Snippet

SamplingImageData samplingImageData = extendedResult[j].samplingImage;

This page is compatible for:

Version 7.5.0

Is this page helpful?

YesYes NoNo

In this article:

version 8.1.0

  • Latest version
  • Version 9.x
    • Version 9.6.40
    • Version 9.6.20
    • Version 9.6.11
    • Version 9.6.10
    • Version 9.6.0
    • Version 9.4.0
    • Version 9.2.13
    • Version 9.2.11
    • Version 9.2.10
    • Version 9.0.2
    • Version 9.0.1
    • Version 9.0.0
  • Version 8.x
    • Version 8.9.3
    • Version 8.9.1
    • Version 8.9.0
    • Version 8.8.0
    • Version 8.6.0
    • Version 8.4.0
    • Version 8.2.1
    • Version 8.2.0
    • Version 8.1.2
    • Version 8.1.0
    • Version 8.0.0
  • Version 7.x
    • Version 7.6.0
    • Version 7.5.0
Change +