ImgFrame
These are all the images (regardless of their encoding/format), as well as the depth/disparity "image". ColorCamera and MonoCamera are the source of the image frame messages.Examples of functionality
Reference
class
depthai.ImgFrame(depthai.Buffer)
class
class
Type
Members: YUV422i YUV444p YUV420p YUV422p YUV400p RGBA8888 RGB161616 RGB888p BGR888p RGB888i BGR888i RGBF16F16F16p BGRF16F16F16p RGBF16F16F16i BGRF16F16F16i GRAY8 GRAYF16 LUT2 LUT4 LUT16 RAW16 RAW14 RAW12 RAW10 RAW8 PACK10 PACK12 YUV444i NV12 NV21 BITSTREAM HDR NONE
method
method
getCategory(self) -> int: int
Retrieves image category
method
getColorTemperature(self) -> int: int
Retrieves white-balance color temperature of the light source, in kelvins
method
getCvFrame(self) -> typing.Any: typing.Any
Returns BGR or grayscale frame compatible with use in other opencv functions
method
getExposureTime(self) -> datetime.timedelta: datetime.timedelta
Retrieves exposure time
method
getFrame(self, copy: bool = False) -> numpy.ndarray: numpy.ndarray
Returns numpy array with shape as specified by width, height and type
method
getHeight(self) -> int: int
Retrieves image height in pixels
method
getInstanceNum(self) -> int: int
Retrieves instance number
method
getLensPosition(self) -> int: int
Retrieves lens position, range 0..255. Returns -1 if not available
method
getLensPositionRaw(self) -> float: float
Retrieves lens position, range 0.0f..1.0f. Returns -1 if not available
method
getSensitivity(self) -> int: int
Retrieves sensitivity, as an ISO value
method
getSequenceNum(self) -> int: int
Retrieves sequence number
method
method
method
getType(self) -> RawImgFrame.Type: RawImgFrame.Type
Retrieves image type
method
getWidth(self) -> int: int
Retrieves image width in pixels
method
setCategory(self, category: int) -> ImgFrame: ImgFrame
Parameter ``category``: Image category
method
setFrame(self, array: numpy.ndarray)
Copies array bytes to ImgFrame buffer
method
setHeight(self, height: int) -> ImgFrame: ImgFrame
Specifies frame height Parameter ``height``: frame height
method
setInstanceNum(self, instance: int) -> ImgFrame: ImgFrame
Instance number relates to the origin of the frame (which camera) Parameter ``instance``: Instance number
method
setSequenceNum(self, seq: int) -> ImgFrame: ImgFrame
Specifies sequence number Parameter ``seq``: Sequence number
method
method
setTimestamp(self, timestamp: datetime.timedelta) -> ImgFrame: ImgFrame
Retrieves image timestamp related to dai::Clock::now()
method
setTimestampDevice(self, arg0: datetime.timedelta) -> ImgFrame: ImgFrame
Sets image timestamp related to dai::Clock::now()
method
setType(self, type: RawImgFrame.Type) -> ImgFrame: ImgFrame
Specifies frame type, RGB, BGR, ... Parameter ``type``: Type of image
method
setWidth(self, width: int) -> ImgFrame: ImgFrame
Specifies frame width Parameter ``width``: frame width
class
depthai.ImgFrame.Specs
variable
variable
variable
variable
variable
variable
variable
variable
method
class
depthai.ImgFrame.Type
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
variable
method
method
method
method
method
method
method
method
method
method
property
property
Need assistance?
Head over to Discussion Forum for technical support or any other questions you might have.