Table of contents

IntermediateResultManager

The IntermediateResultManager class provides the API needed to manage the intermediate results that are produced during the capture process. Currently, the IntermediateResultManager is mainly used for when the user wants to retrieve the original image or frame that the captured result is taken from, especially in an interactive video scenario where the input is a camera feed.

Definition

Assembly: dynamsoft-capture-vision-react-native

class IntermediateResultManager

Methods

Method Description
getOriginalImage Retrieves the original image (as an ImageData object) associated with the captured result.

getOriginalImage

Retrieves the original image (as an ImageData object) associated with the captured result, based on the originalImageHashId of the CapturedResult.

getOriginalImage(imageHashId: string): ImageData

Remarks

In order to get the hashID input parameter, please access the originalImageHashId of the CapturedResult. The CapturedResult can be a DecodedBarcodesResult (if the Barcode Reader is used) and so the originalImageHashId can be obtained from the DecodedBarcodesResult object directly since it extends the CapturedResult class.

The method returns a ImageData object which contains all the info of the original image, including a byte array to represent the raw image.

Code Snippet

let router = CaptureVisionRouter.getInstance();
let intermediateResultManager = router.getIntermediateResultManager()
router.addResultReceiver({
   onCaptureResultReceive: result => {
     let imageData = intermediateResultManager.getOriginalImage(result.originalImageHashId)
     //...
   }
});

This page is compatible for:

Is this page helpful?

YesYes NoNo

In this article: