| layout | default-layout |
|---|---|
| title | CaptureVisionRouter Multiple-File Processing Methods - Dynamsoft Capture Vision Router Module Python Edition API Reference |
| description | API reference for the multiple-file processing methods of the CaptureVisionRouter class in Dynamsoft Capture Vision Python Edition. |
| keywords | capture vision, multiple-file processing, api reference, python |
| needAutoGenerateSidebar | true |
| needGenerateH3Content | false |
| Method | Description |
|---|---|
set_input |
Sets an image source to provide images for consecutive processing. |
get_input |
Gets the attached image source adapter object of the capture vision router. |
add_capture_state_listener |
Adds an object that listens to the state changes of the capture process. |
remove_capture_state_listener |
Removes an object which listens to the state changes of the capture process. |
add_image_source_state_listener |
Adds an object that listens to state changes of the image source. |
remove_image_source_state_listener |
Removes an object which listens to state changes of the image source. |
add_result_receiver |
Adds an object as the receiver of captured results. |
remove_result_receiver |
Removes an object which was added as a receiver of captured results. |
add_result_filter |
Adds an object as the filter of captured results. |
remove_result_filter |
Removes an object which was added as a filter of captured results. |
start_capturing |
Starts to process images consecutively. |
stop_capturing |
Stops the consecutive processing. |
pause_capturing |
Pauses the capture process. The current thread will be blocked until the capture process is resumed. |
resume_capturing |
Resumes the capture process. The current thread will be unblocked after the capture process is resumed. |
switch_capturing_template |
Switches the capturing template during the image processing workflow. |
Sets an image source to provide images for consecutive processing.
def set_input(self, adapter: ImageSourceAdapter) -> Tuple[int, str]:Parameters
adapter Specifies an object which has implemented the ImageSourceAdapter Class.
Return Value
Returns a tuple containing following elements:
error_code<int>: The error code indicating the status of the operation.error_message<str>: A descriptive message explaining the error.
See Also
[EnumErrorCode]({{ site.dcvb_python_api }}core/enum-error-code.html)
[ImageSourceAdapter]({{ site.dcvb_python_api }}core/basic-classes/image-source-adapter.html)
[DirectoryFetcher]({{ site.dcvb_python_api }}utility/directory-fetcher.html)
[FileFetcher]({{ site.dcvb_python_api }}utility/file-fetcher.html)
Gets the attached image source adapter object of the capture vision router.
def get_input(self) -> ImageSourceAdapter:Return Value
Returns the attached image source adapter object of the capture vision router.
See Also
[ImageSourceAdapter]({{ site.dcvb_python_api }}core/basic-classes/image-source-adapter.html)
[DirectoryFetcher]({{ site.dcvb_python_api }}utility/directory-fetcher.html)
[FileFetcher]({{ site.dcvb_python_api }}utility/file-fetcher.html)
Adds an object that listens to the state changes of the capture process.
def add_capture_state_listener(self, listener: CaptureStateListener) -> Tuple[int, str]:Parameters
listener Specifies a listening object of the type [CaptureStateListener]({{ site.dcvb_python_api }}capture-vision-router/auxiliary-classes/capture-state-listener.html) to be added.
Return Value
Returns a tuple containing following elements:
error_code<int>: The error code indicating the status of the operation.error_message<str>: A descriptive message explaining the error.
See Also
[EnumErrorCode]({{ site.dcvb_python_api }}core/enum-error-code.html)
[CaptureStateListener]({{ site.dcvb_python_api }}capture-vision-router/auxiliary-classes/capture-state-listener.html)
Removes an object which listens to the state changes of the capture process.
def remove_capture_state_listener(self, listener: CaptureStateListener) -> Tuple[int, str]:Parameters
listener Specifies a listening object of the type [CaptureStateListener]({{ site.dcvb_python_api }}capture-vision-router/auxiliary-classes/capture-state-listener.html) to be removed.
Return Value
Returns a tuple containing following elements:
error_code<int>: The error code indicating the status of the operation.error_message<str>: A descriptive message explaining the error.
See Also
[EnumErrorCode]({{ site.dcvb_python_api }}core/enum-error-code.html)
[CaptureStateListener]({{ site.dcvb_python_api }}capture-vision-router/auxiliary-classes/capture-state-listener.html)
Adds an object that listens to state changes of the image source.
def add_image_source_state_listener(self, listener: ImageSourceStateListener) -> Tuple[int, str]:Parameters
listener Specifies a listening object of the type [ImageSourceStateListener]({{ site.dcvb_python_api }}capture-vision-router/auxiliary-classes/image-source-state-listener.html) to be added.
Return Value
Returns a tuple containing following elements:
error_code<int>: The error code indicating the status of the operation.error_message<str>: A descriptive message explaining the error.
See Also
[EnumErrorCode]({{ site.dcvb_python_api }}core/enum-error-code.html)
[ImageSourceStateListener]({{ site.dcvb_python_api }}capture-vision-router/auxiliary-classes/image-source-state-listener.html)
Removes an object which listens to state changes of the image source.
def remove_image_source_state_listener(self, listener: ImageSourceStateListener) -> Tuple[int, str]:Parameters
listener Specifies a listening object of the type [ImageSourceStateListener]({{ site.dcvb_python_api }}capture-vision-router/auxiliary-classes/image-source-state-listener.html) to be removed.
Return Value
Returns a tuple containing following elements:
error_code<int>: The error code indicating the status of the operation.error_message<str>: A descriptive message explaining the error.
See Also
[EnumErrorCode]({{ site.dcvb_python_api }}core/enum-error-code.html)
[ImageSourceStateListener]({{ site.dcvb_python_api }}capture-vision-router/auxiliary-classes/image-source-state-listener.html)
Adds an object as the receiver of captured results.
def add_result_receiver(self, receiver: CapturedResultReceiver) -> Tuple[int, str]:Parameters
receiver Specifies a receiver object of the type [CapturedResultReceiver]({{ site.dcvb_python_api }}capture-vision-router/auxiliary-classes/captured-result-receiver.html) to be added.
Return Value
Returns a tuple containing following elements:
error_code<int>: The error code indicating the status of the operation.error_message<str>: A descriptive message explaining the error.
See Also
[EnumErrorCode]({{ site.dcvb_python_api }}core/enum-error-code.html)
[CapturedResultReceiver]({{ site.dcvb_python_api }}capture-vision-router/auxiliary-classes/captured-result-receiver.html)
Removes an object which was added as a receiver of captured results.
def remove_result_receiver(self, receiver: CapturedResultReceiver) -> Tuple[int, str]:Parameters
receiver Specifies a receiver object of the type [CapturedResultReceiver]({{ site.dcvb_python_api }}capture-vision-router/auxiliary-classes/captured-result-receiver.html) to be removed.
Return Value
Returns a tuple containing following elements:
error_code<int>: The error code indicating the status of the operation.error_message<str>: A descriptive message explaining the error.
See Also
[EnumErrorCode]({{ site.dcvb_python_api }}core/enum-error-code.html)
[CapturedResultReceiver]({{ site.dcvb_python_api }}capture-vision-router/auxiliary-classes/captured-result-receiver.html)
Adds an object as the filter of captured results.
def add_result_filter(self, filter: CapturedResultFilter) -> Tuple[int, str]:Parameters
filter Specifies a filter object of the type [CapturedResultFilter]({{ site.dcvb_python_api }}capture-vision-router/auxiliary-classes/captured-result-filter.html) to be added.
Return Value
Returns a tuple containing following elements:
error_code<int>: The error code indicating the status of the operation.error_message<str>: A descriptive message explaining the error.
See Also
[EnumErrorCode]({{ site.dcvb_python_api }}core/enum-error-code.html)
[CapturedResultFilter]({{ site.dcvb_python_api }}capture-vision-router/auxiliary-classes/captured-result-filter.html)
Removes an object which was added as a filter of captured results.
def remove_result_filter(self, filter: CapturedResultFilter) -> Tuple[int, str]:Parameters
filter Specifies a filter object of the type [CapturedResultFilter]({{ site.dcvb_python_api }}capture-vision-router/auxiliary-classes/captured-result-filter.html) to be removed.
Return Value
Returns a tuple containing following elements:
error_code<int>: The error code indicating the status of the operation.error_message<str>: A descriptive message explaining the error.
See Also
[EnumErrorCode]({{ site.dcvb_python_api }}core/enum-error-code.html)
[CapturedResultFilter]({{ site.dcvb_python_api }}capture-vision-router/auxiliary-classes/captured-result-filter.html)
Starts to process images consecutively.
def start_capturing(self, template_name: str = "", wait_for_thread_exit: bool = False) -> Tuple[int, str]:Parameters
template_name Specifies a CaptureVisionTemplate to use for capturing.
wait_for_thread_exit Indicates whether to wait for the capture process to complete before returning.
Remarks
- There are two types of
CaptureVisionTemplate: the [preset ones]({{ site.dcvb_python_api }}capture-vision-router/enum-preset-template.html) which come with the SDK and the custom ones that get initialized when the user calls [init_settings]({{ site.dcvb_python_api }}capture-vision-router/settings.html#init_settings) / [init_settings_from_file]({{ site.dcvb_python_api }}capture-vision-router/settings.html#init_settings_from_file). - When using a custom template, the parameter
template_nameshould be the name of the [CaptureVisionTemplateobject]({{ site.dcvb_parameters }}file/capture-vision-template.html) in the JSON template file. - Please be aware that the preset
CaptureVisionTemplateswill be overwritten should the user callinit_settings/init_settings_from_fileand pass his own settings. - If parameter
template_nameis 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 tuple containing following elements:
error_code<int>: The error code indicating the status of the operation.error_message<str>: A descriptive message explaining the error.
See Also
[EnumErrorCode]({{ site.dcvb_python_api }}core/enum-error-code.html)
Stops the multiple-file processing.
def stop_capturing(self, wait_for_remaining_tasks: bool = True, wait_for_thread_exit: bool = True) -> None:Parameters
wait_for_remaining_tasks Indicates whether to wait for the remaining tasks to complete before returning. The default value is True.
wait_for_thread_exit Indicates whether to wait for the capture process to complete before returning. The default value is True.
Pauses the capture process. The current thread will be blocked until the capture process is resumed.
def pause_capturing(self) -> None:Resumes the capture process. The current thread will be unblocked after the capture process is resumed.
def resume_capturing(self) -> None:Switches the capturing template during the image processing workflow.
def switch_capturing_template(self, template_name: str) -> Tuple[int, str]:Parameters
template_name The name of the new capturing template to apply.
Return Value
Returns a tuple containing following elements:
error_code<int>: The error code indicating the status of the operation.error_message<str>: A descriptive message explaining the error.
Remarks
- Introduced in Dynamsoft Barcode Reader SDK version 11.2.1000 and Dynamsoft Capture Vision version 3.2.1000.
See Also
[EnumErrorCode]({{ site.dcvb_python_api }}core/enum-error-code.html)