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. |
removeAllResultReceivers |
Removes all user-added CapturedResultReceivers. |
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. |
removeAllCaptureStateListeners |
Removes all user-added CaptureStateListeners. |
addResultFilter |
Adds a CapturedResultFilter object to filter non-essential results. |
removeResultFilter |
Removes the specified CapturedResultFilter object. |
removeAllResultFilters |
Removes all user-added CapturedResultFilters. |
addImageSourceStateListener |
Register a ImageSourceStateListener to get callback when the status of ImageSourceAdapter received. |
removeImageSourceStateListener |
Removes a ImageSourceStateListener from the Capture Vision Router. |
removeAllImageSourceStateListeners |
Removes all user-added ImageSourceStateListeners. |
switchCapturingTemplate |
Switch the image processing settings with the CaptureVisionTemplate name during the image processing workflow. |
setInput
Sets up an image source to provide images for continuous processing.
void setInput(ImageSourceAdapter imageSourceAdapter) throws CaptureVisionRouterException;
Parameters
[in] imageSourceAdapter: 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.
removeAllResultReceivers
Removes all user-added CapturedResultReceivers.
void removeAllResultReceivers();
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
EnumPresetTemplatemember. This is available only if you have never upload a new template viainitSettingsorinitSettingsFromFile. - A string that represents one of the template name that you have uploaded via
initSettingsorinitSettingsFromFile. - ”” (empty string) to use the default template. The first template will be used if you have uploaded a template file via
initSettingsFromFileorinitSettings.
[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.
removeResultFilter
Removes all user-addedCapturedResultFilters.
void removeAllResultFilters();
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
removeAllCaptureStateListeners
Removes all user-added CaptureStateListeners.
void removeAllCaptureStateListeners();
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.
removeAllImageSourceStateListeners
Removes all user-added ImageSourceStateListeners.
void removeAllImageSourceStateListeners();
switchCapturingTemplate
Switch the image processing settings with the CaptureVisionTemplate name during the image processing workflow.
void switchCapturingTemplate(String templateName) throws CaptureVisionException;
Parameters
[in] templateName: The name of the new capturing template to apply.
Exception
| Error Code | Value | Description |
|---|---|---|
| EC_TEMPLATE_NAME_INVALID | -10036 | The target template name is invalid. |
Remarks
- Introduced in Dynamsoft Barcode Reader SDK version 11.2.1000 and Dynamsoft Capture Vision version 3.2.1000.