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.

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);

This page is compatible for:

Version 7.5.0

Is this page helpful?

YesYes NoNo

In this article:

latest version

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