CaptureImage.fromNumpy Method

Module: CaptureImage

Definition

Creates an Image from the specified data buffer. Supported pixel formats are grayscale formats, BGR and RGB 24bits, and BGRA. For integers format, input datatype must be UINT8.

@staticmethod
from_numpy(data: bytearray, pixel_format: PixelFormat) -> CaptureImage

Parameters

data bytearray
in A numpy array containing the image data.

pixel_format PixelFormat
in The pixel format of the image.

Returns

The newly created capture image.

Exceptions

An error has occurred during Devices Library execution.