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: intRetrieves image category
method
getColorTemperature(self) -> int: intRetrieves white-balance color temperature of the light source, in kelvins
method
getCvFrame(self) -> typing.Any: typing.AnyReturns BGR or grayscale frame compatible with use in other opencv functions
method
getExposureTime(self) -> datetime.timedelta: datetime.timedeltaRetrieves exposure time
method
getFrame(self, copy: bool = False) -> numpy.ndarray: numpy.ndarrayReturns numpy array with shape as specified by width, height and type
method
getHeight(self) -> int: intRetrieves image height in pixels
method
getInstanceNum(self) -> int: intRetrieves instance number
method
getLensPosition(self) -> int: intRetrieves lens position, range 0..255. Returns -1 if not available
method
getLensPositionRaw(self) -> float: floatRetrieves lens position, range 0.0f..1.0f. Returns -1 if not available
method
getSensitivity(self) -> int: intRetrieves sensitivity, as an ISO value
method
getSequenceNum(self) -> int: intRetrieves sequence number
method
method
method
getType(self) -> RawImgFrame.Type: RawImgFrame.TypeRetrieves image type
method
getWidth(self) -> int: intRetrieves image width in pixels
method
setCategory(self, category: int) -> ImgFrame: ImgFrameParameter ``category``: Image category
method
setFrame(self, array: numpy.ndarray)Copies array bytes to ImgFrame buffer
method
setHeight(self, height: int) -> ImgFrame: ImgFrameSpecifies frame height Parameter ``height``: frame height
method
setInstanceNum(self, instance: int) -> ImgFrame: ImgFrameInstance number relates to the origin of the frame (which camera) Parameter ``instance``: Instance number
method
setSequenceNum(self, seq: int) -> ImgFrame: ImgFrameSpecifies sequence number Parameter ``seq``: Sequence number
method
method
setTimestamp(self, timestamp: datetime.timedelta) -> ImgFrame: ImgFrameRetrieves image timestamp related to dai::Clock::now()
method
setTimestampDevice(self, arg0: datetime.timedelta) -> ImgFrame: ImgFrameSets image timestamp related to dai::Clock::now()
method
setType(self, type: RawImgFrame.Type) -> ImgFrame: ImgFrameSpecifies frame type, RGB, BGR, ... Parameter ``type``: Type of image
method
setWidth(self, width: int) -> ImgFrame: ImgFrameSpecifies 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.