ImgFrame
These are all the images (regardless of their encoding/format), as well as the depth/disparity "image". Camera is the source of the image frame messages.Examples of functionality
Reference
class
dai::ImgFrame
function
explicit function
ImgFrame(std::shared_ptr< RawImgFrame > ptr)function
~ImgFrame()function
std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > getTimestamp(CameraExposureOffset offset)Retrieves image timestamp (at the specified offset of exposure) related to dai::Clock::now()
function
std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > getTimestampDevice(CameraExposureOffset offset)Retrieves image timestamp (at the specified offset of exposure) directly captured from device's monotonic clock, not synchronized to host time. Used when monotonicity is required.
function
unsigned int getInstanceNum()Retrieves instance number
function
unsigned int getCategory()Retrieves image category
function
unsigned int getWidth()Retrieves image width in pixels
function
unsigned int getHeight()Retrieves image height in pixels
function
Type getType()Retrieves image type
function
std::chrono::microseconds getExposureTime()Retrieves exposure time
function
int getSensitivity()Retrieves sensitivity, as an ISO value
function
int getColorTemperature()Retrieves white-balance color temperature of the light source, in kelvins
function
int getLensPosition()Retrieves lens position, range 0..255. Returns -1 if not available
function
float getLensPositionRaw()Retrieves lens position, range 0.0f..1.0f. Returns -1 if not available
function
ImgFrame & setTimestamp(std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > timestamp)Retrieves image timestamp related to dai::Clock::now()
function
ImgFrame & setTimestampDevice(std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > timestamp)Sets image timestamp related to dai::Clock::now()
function
ImgFrame & setInstanceNum(unsigned int instance)Instance number relates to the origin of the frame (which camera)
Parameters
- instance: Instance number
function
ImgFrame & setCategory(unsigned int category)Parameters
- category: Image category
function
ImgFrame & setSequenceNum(int64_t seq)Specifies sequence number
Parameters
- seq: Sequence number
function
ImgFrame & setWidth(unsigned int width)Specifies frame width
Parameters
- width: frame width
function
ImgFrame & setHeight(unsigned int height)Specifies frame height
Parameters
- height: frame height
function
ImgFrame & setSize(unsigned int width, unsigned int height)Specifies frame size
Parameters
- height: frame height
- width: frame width
function
ImgFrame & setSize(std::tuple< unsigned int, unsigned int > size)Specifies frame size
Parameters
- size: frame size
function
ImgFrame & setType(Type type)Specifies frame type, RGB, BGR, ...
Parameters
- type: Type of image
function
ImgFrame & setFrame(cv::Mat frame)Parameters
This API only available if OpenCV support is enabled
Parameters
- frame: Input cv::Mat frame from which to copy the data
function
cv::Mat getFrame(bool copy)Parameters
This API only available if OpenCV support is enabled
Parameters
- copy: If false only a reference to data is made, otherwise a copy
Returns
function
cv::Mat getCvFrame()Parameters
This API only available if OpenCV support is enabled
Returns
cv::Mat for use in opencv functions
function
std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > getTimestamp()Retrieves timestamp related to dai::Clock::now()
function
std::chrono::time_point< std::chrono::steady_clock, std::chrono::steady_clock::duration > getTimestampDevice()Retrieves timestamp directly captured from device's monotonic clock, not synchronized to host time. Used mostly for debugging
enum
RawImgFrame::Type Type
enum
RawImgFrame::Specs Specs
enum
RawImgFrame::CameraSettings CameraSettings
Need assistance?
Head over to Discussion Forum for technical support or any other questions you might have.