Table of contents

Multiple-File Processing Methods - CaptureVisionRouter Class

Method Description
setInput Sets an image source to provide images for consecutive processing.
getInput Gets the attached image source adapter object of the capture vision router.
addCaptureStateListener Adds an object that listens to the state changes of the capture process.
removeCaptureStateListener Removes an object which listens to the state changes of the capture process.
addImageSourceStateListener Adds an object that listens to state changes of the image source.
removeImageSourceStateListener Removes an object which listens to state changes of the image source.
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 an object which was added as a filter of captured results.
startCapturing Starts to process images consecutively.
stopCapturing Stops the consecutive processing.
pauseCapturing Pauses the capture process. The current thread will be blocked until the capture process is resumed.
resumeCapturing Resumes the capture process. The current thread will be unblocked after the capture process is resumed.

setInput

Sets an image source to provide images for consecutive processing.

public void setInput(ImageSourceAdapter pAdapter) throws CaptureVisionException

Parameters

pAdapter Specifies an object which has implemented the ImageSourceAdapter interface.

Exceptions

CaptureVisionException

See Also

ImageSourceAdapter

DirectoryFetcher

FileFetcher

getInput

Gets the attached image source adapter object of the capture vision router.

public ImageSourceAdapter getInput()

Return Value

Returns the attached image source adapter object of the capture vision router.

See Also

ImageSourceAdapter

DirectoryFetcher

FileFetcher

addCaptureStateListener

Adds an object that listens to the state changes of the capture process.

public void addCaptureStateListener(CaptureStateListener listener) throws CaptureVisionException

Parameters

listener Specifies a listening object of the type CaptureStateListener to be added.

Exceptions

CaptureVisionException

See Also

CaptureStateListener

removeCaptureStateListener

Removes an object which listens to the state changes of the capture process.

public void removeCaptureStateListener(CaptureStateListener listener) throws CaptureVisionException

Parameters

listener Specifies a listening object of the type CaptureStateListener to be removed.

Exceptions

CaptureVisionException

See Also

CaptureStateListener

addImageSourceStateListener

Adds an object that listens to state changes of the image source.

public void addImageSourceStateListener(ImageSourceStateListener listener) throws CaptureVisionException

Parameters

listener Specifies a listening object of the type ImageSourceStateListener to be added.

Exceptions

CaptureVisionException

See Also

ImageSourceStateListener

removeImageSourceStateListener

Removes an object which listens to state changes of the image source.

public void removeImageSourceStateListener(ImageSourceStateListener listener) throws CaptureVisionException

Parameters

listener Specifies a listening object of the type ImageSourceStateListener to be removed.

Exceptions

CaptureVisionException

See Also

ImageSourceStateListener

addResultReceiver

Adds an object as the receiver of captured results.

public void addResultReceiver(CapturedResultReceiver receiver) throws CaptureVisionException

Parameters

receiver Specifies a receiver object of the type CapturedResultReceiver to be added.

Exceptions

CaptureVisionException

See Also

CapturedResultReceiver

removeResultReceiver

Removes an object which was added as a receiver of captured results.

public void removeResultReceiver(CapturedResultReceiver receiver) throws CaptureVisionException

Parameters

receiver Specifies a receiver object of the type CapturedResultReceiver to be removed.

Exceptions

CaptureVisionException

See Also

CapturedResultReceiver

addResultFilter

Adds an object as the filter of captured results.

public void addResultFilter(CapturedResultFilter filter) throws CaptureVisionException

Parameters

filter Specifies a filter object of the type CapturedResultFilter to be added.

Exceptions

CaptureVisionException

See Also

CapturedResultFilter

removeResultFilter

Removes an object which was added as a filter of captured results.

public void removeResultFilter(CapturedResultFilter filter)

Parameters

filter Specifies a filter object of the type CapturedResultFilter to be removed.

See Also

CapturedResultFilter

startCapturing

Starts to process images consecutively.

public CaptureVisionError startCapturing() throws CaptureVisionException
public CaptureVisionError startCapturing(String templateName, boolean waitForThreadExit) throws CaptureVisionException

Parameters

templateName Specifies a CaptureVisionTemplate to use for capturing.

waitForThreadExit Indicates whether to wait for the capture process to complete before returning.

Remarks

  • There are two types of CaptureVisionTemplate: the preset ones which come with the SDK and the custom ones that get initialized when the user calls initSettings / initSettingsFromFile.
  • When using a custom template, the parameter templateName should be the name of the CaptureVisionTemplate object in the JSON template file.
  • Please be aware that the preset CaptureVisionTemplates will be overwritten should the user call initSettings / initSettingsFromFile and pass his own settings.
  • If parameter templateName is not specified, the preset one named ‘Default’ will be used. However, if the preset ones have been overwritten as described above, the first CaptureVisionTemplate from the user’s own settings will be used instead.

Return Value

Returns a CaptureVisionError object that contains error information.

Exceptions

CaptureVisionException

See Also

CaptureVisionError

stopCapturing

Stops the multiple-file processing.

public void stopCapturing()
public void stopCapturing(boolean waitForRemainingTasks, boolean waitForThreadExit)

Parameters

waitForRemainingTasks Indicates whether to wait for the remaining tasks to complete before returning. The default value is True.
waitForThreadExit Indicates whether to wait for the capture process to complete before returning. The default value is True.

pauseCapturing

Pauses the capture process. The current thread will be blocked until the capture process is resumed.

public void pauseCapturing()

resumeCapturing

Resumes the capture process. The current thread will be unblocked after the capture process is resumed.

public void resumeCapturing()

This page is compatible for:

Is this page helpful?

YesYes NoNo

In this article: