Resource Base
Table of contents

Processing multiple Images/Pages

Method Description
setInput Sets up an image source to provide images for continuous processing.
getInput Returns the image source object.
addResultReceiver Adds a CapturedResultReceiver object as the receiver of captured results.
removeResultReceiver Removes the specified CapturedResultReceiver object.
startCapturing Initiates a capturing process based on a specified template. This process is repeated for each image fetched from the source.
stopCapturing Stops the capturing process.
pauseCapturing Pauses the Capture Vision Router.
resumeCapturing Resumes the Capture Vision Router.
addCaptureStateListener Registers a CaptureStateListener to be used as a callback when capture state is received.
removeCaptureStateListener Removes a CaptureStateListener that has been configured for the Capture Vision Router.
addResultFilter Adds a CapturedResultFilter object to filter non-essential results.
removeResultFilter Removes the specified CapturedResultFilter object.
addImageSourceStateListener Register a ImageSourceStateListener to get callback when the status of ImageSourceAdapter received.
removeImageSourceStateListener Removes a ImageSourceStateListener from the Capture Vision Router.

setInput

Sets up an image source to provide images for continuous processing.

void setInput(ImageSourceAdapter adapter) throws CaptureVisionRouterException;

Parameters

[in] adapter: An object of ImageSourceAdapter.

You can use the following officially implemented ImageSourceAdapter classes:

  • CameraEnhancer: A camera class that can capture video frames continuously.
  • DirectoryFetcher: A class that can fetch all images from a directory. It supports the multi-page files like .PDF and .TIFF.
  • FileFetcher: A class that can fetch the specified image(s). It supports the multi-page files like .PDF and .TIFF.

Exception

Error Code Value Description
EC_CALL_REJECTED_WHEN_CAPTURING -10062 Function call is rejected when capturing in progress.

getInput

Returns the image source object.

ImageSourceAdapter getInput();

Return Value

The ImageSourceAdapter object that is bind with this CaptureVisionRouter object.

addResultReceiver

Adds a CapturedResultReceiver object as the receiver of captured results.

void addResultReceiver(CapturedResultReceiver receiver);

Parameters

[in] receiver: The receiver object, of type CapturedResultReceiver.

removeResultReceiver

Removes the specified CapturedResultReceiver object.

void removeResultReceiver(CapturedResultReceiver receiver);

Parameters

[in] receiver: The receiver object, of type CapturedResultReceiver.

startCapturing

Initiates a capturing process based on a specified template. This process is repeated for each image fetched from the source.

void startCapturing(String templateName, CompletionListener completionHandler);

Parameters

[in] templateName: Specifies a “CaptureVisionTemplate” to use. The following value are available for this parameter:

  • One of the EnumPresetTemplate member. This is available only if you have never upload a new template via initSettings or initSettingsFromFile.
  • A string that represents one of the template name that you have uploaded via initSettings or initSettingsFromFile.
  • ”” (empty string) to use the default template. The first template will be used if you have uploaded a template file via initSettingsFromFile or initSettings.

[in] completionHandler: A CompletionListener the system calls after it finishes the startCapturing.

stopCapturing

Stops the capturing process.

void stopCapturing();

pauseCapturing

Pauses the capturing.

void pauseCapturing();

resumeCapturing

Resumes the capturing.

void resumeCapturing();

addResultFilter

Adds a CapturedResultFilter object to filter non-essential results. Currnetly, MultiFrameCrossFilter is the only supported implementation of the CapturedResultFilter.

void addResultFilter(CapturedResultFilter filter);

Parameters

[in] filter: The filter object, of type CapturedResultFilter. Currnetly, is must be a MultiFrameCrossFilter object.

removeResultFilter

Removes the specified CapturedResultFilter object.

void removeResultFilter(CapturedResultFilter filter);

Parameters

[in] filter: The filter object, of type CapturedResultFilter.

addCaptureStateListener

Registers a CaptureStateListener to be used as a callback when capture state is received.

void addCaptureStateListener(CaptureStateListener listener);

Parameters

[in] listener: A delegate object of CaptureStateListener to receive the capture state.

removeCaptureStateListener

Removes a CaptureStateListener that has been configured for the Capture Vision Router.

void removeCaptureStateListener(CaptureStateListener listener);

Parameters

[in] listener: An object of CaptureStateListener

addImageSourceStateListener

Register a ImageSourceStateListener to get callback when the status of ImageSourceAdapter received.

void addImageSourceStateListener(ImageSourceStatestener listener);

Parameters

[in] listener: An object of ImageSourceStateListener.

removeImageSourceStateListener

Removes a ImageSourceStateListener from the Capture Vision Router.

void removeImageSourceStateListener(ImageSourceStateListener listener);

Parameters

[in] listener: An object of ImageSourceStateListener.

This page is compatible for:

Is this page helpful?

YesYes NoNo

In this article:

latest version

    Change +