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
See Also
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
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
See Also
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
See Also
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
See Also
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
See Also
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
See Also
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
See Also
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
See Also
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
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
templateNameshould be the name of theCaptureVisionTemplateobject in the JSON template file. - Please be aware that the preset
CaptureVisionTemplateswill be overwritten should the user callinitSettings/initSettingsFromFileand pass his own settings. - If parameter
templateNameis not specified, the preset one named ‘Default’ will be used. However, if the preset ones have been overwritten as described above, the firstCaptureVisionTemplatefrom the user’s own settings will be used instead.
Return Value
Returns a CaptureVisionError object that contains error information.
Exceptions
See Also
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()