Dev Center
Swift
Objective-C
Table of contents

Result Methods

Method Description
initIntermediateResult Inits an intermediateResult struct with default values.
getIntermediateResults Get intermediate results.
decodeIntermediateResults Decodes barcode from intermediate results.
enableResultVerification Enable Result Verification feature to improve the accuracy of barcode results for video streaming barcode decoding. This feature is not enabled by default.
enableDuplicateFilter Enable Duplicate Filter feature to filter out the duplicate results in the period of 3000ms for video barcode decoding. Barcode results with the same text and format will be returned only once during the period.

initIntermediateResult

Inits an intermediateResult struct with default values.

IntermediateResult initIntermediateResults(int resultType) throws BarcodeReaderException

Parameters

resultType: An int value that indicates the intermediate result type. The int value should be available in (EnumIntermediateResultType).

Return Value

An IntermediateResult struct with default values.

Exceptions

A BarcodeReaderException is thrown when:

  • Your license key doesn’t include the intermediate result item.

Code Snippet

BarcodeReader reader = new BarcodeReader();
/*Init DBR license before decoding*/
IntermediateResult imResult = reader.initIntermediateResult(EnumIntermediateResultType.IRT_ORIGINAL_IMAGE);

getIntermediateResults

Get intermediate results containing the original image, the color clustered image, the binarized Image, contours, Lines, TextBlocks, etc.

IntermediateResult[] getIntermediateResults() throws BarcodeReaderException 

Return Value

The IntermediateResult array were returned by the SDK.

Exceptions

A BarcodeReaderException is thrown when:

  • The library failed to get the intermediate result, which might because your license key doesn’t include the intermediate result item.

Code Snippet

BarcodeReader reader = new BarcodeReader();
PublicRuntimeSettings settings = reader.getRuntimeSettings();
settings.intermediateResultTypes = EnumIntermediateResultType.IRT_ORIGINAL_IMAGE | EnumIntermediateResultType.IRT_COLOUR_CLUSTERED_IMAGE | EnumIntermediateResultType.IRT_COLOUR_CONVERTED_GRAYSCALE_IMAGE;
reader.updateRuntimeSettings(settings);
TextResult[] result = reader.decodeFile("your file path","");
IntermediateResult[] irtResult = reader.getIntermediateResults();

decodeIntermediateResults

Decodes barcode from intermediate results.

TextResult[] decodeIntermediateResults(IntermediateResult[] results) throws BarcodeReaderException

Parameters

results: An array of intermediate result.

Return Value

The TextResult of all successfully decoded barcodes. TextResult includes the text, format and other information about the barcodes.

Exceptions

BarcodeReaderException

Code Snippet

BarcodeReader reader = new BarcodeReader();
/*Init DBR license before decoding*/
PublicRuntimeSettings settings = reader.getRuntimeSettings();
settings.intermediateResultTypes = EnumIntermediateResultType.IRT_ORIGINAL_IMAGE;
reader.updateRuntimeSettings(settings);
reader.decodeFile("your file path","");
IntermediateResult[] irtResult = reader.getIntermediateResults();
TextResult[] result = reader.decodeIntermediateResults(irtResult,"");

enableResultVerification

Enable Result Verification feature to improve the accuracy of barcode results for video streaming barcode decoding. This feature is not enabled by default.

There are 2 way for you to get barcode results:

  • From the return value of decode methods when processing a single image.
  • From the textResultCallback when processing the video streaming.

Result verification feature only effects on the OneD barcode results you get from textResultCallback.

void enableResultVerification(boolean)

Code Snippet

reader.enableResultVerification(true)
// To check the status of this mode:
boolean x = reader.getEnableResultVerificationStatus();

enableDuplicateFilter

Enable Duplicate Filter feature to filter out the duplicate results in the period of 3000ms for video barcode decoding. Barcode results with the same text and format will be returned only once during the period.

There are 2 way for you to get barcode results:

  • From the return value of decode methods when processing a single image.
  • From the textResultCallback when processing the video streaming.

Duplicate filter only effects on the duplicate results that output by textResultCallback.

void enableDuplicateFilter(boolean)

Code Snippet

reader.enableDuplicateFilter(true)

This page is compatible for:

Version 7.5.0

Is this page helpful?

YesYes NoNo

In this article:

version 8.8.0

  • Latest version (10.2.10)
  • Version 10.x
    • Version 10.0.21
    • Version 10.0.20
  • Version 9.x
    • 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 +