Resource Base
Table of contents

Single-File Processing Methods - CaptureVisionRouter Class

Method Description
capture Process an image or file to derive important information.

capture

Process an image or file to derive important information. It can optionally use a specified template for the capture.

def capture(self, *args) -> CapturedResult:

Parameters

args <tuple>: A variable-length argument list. Can be one of the following:

  • file_path <str>, template_name <str, optional>: Specifies the path of the file to process and a CaptureVisionTemplate to use for capturing.
  • file_bytes <bytes>, template_name <str, optional>: Specifies the image file bytes in memory to process and a CaptureVisionTemplate to use for capturing.
  • image_data <ImageData>, template_name <str, optional>: Specifies the image data to process and a CaptureVisionTemplate to use for capturing.
  • image <numpy.ndarray>, image_pixel_format <EnumImagePixelFormat, optional>, template_name <str, optional>: Specifies the image, formated in numpy.ndarray, and the image pixel format used in the image byte array to process and a CaptureVisionTemplate to use for capturing.

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.
  • Please be aware that the preset CaptureVisionTemplates will be overwritten should the user call InitSettings / InitSettingsFromFile and pass his own settings.
  • If parameter template_name 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 CapturedResult object containing the captured items.

See Also

ImageData

EnumImagePixelFormat

CapturedResult

This page is compatible for:

Is this page helpful?

YesYes NoNo

In this article:

latest version

Change +