Resource Base
Table of contents

CaptureVisionRouter Module

The CaptureVisionRouter module is defined in the namespace Dynamsoft.CVR. It consists of the classes CaptureVisionRouterModule, CaptureVisionRouter and a few interfaces and enumerations.

CaptureVisionRouterModule Class

This class defines common functionality in the CaptureVisionRouter module.

Name Description
static getVersion() Returns the version of the CaptureVisionRouter module.
static engineResourcePath Sets or returns the path to find the resources files (.wasm, etc.).

CaptureVisionRouter Class

The CaptureVisionRouter class defines how a user interacts with image-processing and semantic-processing products in their applications. A CaptureVisionRouter instance accepts and processes images from an image source and returns processing results of many types. Read Final results for more information. The following code snippet shows its basic usage:

let router = await Dynamsoft.CVR.CaptureVisionRouter.createInstance();
let imageSource = await Dynamsoft.DCE.CameraEnhancer.createInstance();
router.setInput(imageSource);
router.addResultReceiver({
    onCapturedResultReceived: (results)=> {
        // Print out how many results are available.
        console.log(results.items.length);
    }
});
router.startCapturing();

The APIs for this class include:

Create and Destroy Instances

Name Description
static detectEnvironment() Detect the current environment.
static preLoadModule() Loads the specified module to speed up the initialization.
static isModuleLoaded() Returns whether the specified module has been loaded.
static createInstance() Initializes a new instance of the CaptureVisionRouter class.
dispose() Releases all resources used by the CaptureVisionRouter object.
disposed Returns whether the CaptureVisionRouter object has been disposed of.

Single-File Processing

Name Description
capture() Processes a single image or a file containing a single image to derive important information.

Multiple-File Processing

Name Description
setInput() Sets an image source to provide images for consecutive process.
getInput() Returns the image source object.
addResultReceiver() Adds an object as the receiver of captured results.
removeResultReceiver() Removes an object which was added as a receiver of captured results.
addResultFilter() Adds an object as the filter of captured results.
removeResultFilter() Removes a result filter for filtering non-essential results.
startCapturing() Initiates a capturing process based on a specified template.
stopCapturing() Stops the capturing process.

Settings

Name Description
initSettings() Initializes settings with either a file or a string.
outputSettings() Outputs a CaptureVisionTemplate specified by its name to a string.
getSimplifiedSettings() Returns a SimplifiedCaptureVisionSettings object for manipulating a specified CaptureVisionTemplate.
updateSettings() Updates a specified CaptureVisionTemplate with updated an updated SimplifiedCaptureVisionSettings object.
resetSettings() Restores all runtime settings to their original default values.

Interfaces

Enums

This page is compatible for:

Version 1.0

Is this page helpful?

YesYes NoNo

In this article:

version 2.0.10

  • Latest version(2.2.10)
  • Version 2.x
    • Version 2.0.30
    • Version 2.0.20
    • Version 2.0.10
Change +
© 2003–2024 Dynamsoft. All rights reserved.
Privacy Statement / Site Map / Home / Purchase / Support