Get in touch with us today and our team of imaging professionals will be pleased to assist you.
This topic describes the Frame class in the eSDK Pro API.
Frame ClassNamespace: eSdkPro Header: eSdkPro/frame.h
An image representation.
Frame() — default constructoreSdkPro::Frame::Frame()
Constructs an empty frame.
Frame() — allocate new frameeSdkPro::Frame::Frame(uint32_t width, uint32_t height, PIXEL_FORMAT format, HWPlatform platform)
Constructs a new frame.
Parameters:
width — The width of the frame.height — The height of the frame.format — The pixel format of the frame.platform — The location of the frame buffers.
Frame() — pre-allocated data pointereSdkPro::Frame::Frame(uint32_t width, uint32_t height, PIXEL_FORMAT format, uint32_t stride, uint8_t* dataPtr, uint32_t dataSize)
Constructs an frame with an pre-allocated data pointer.
Parameters:
width — The width of the frame.height — The height of the frame.format — The pixel format of the frame.stride — The number of bytes within a single row of the frame.dataPtr — The pointer to the start of the underlying frame data.dataSize — The size of the underlying frame data.
GetWidth()uint32_t eSdkPro::Frame::GetWidth() const
Returns: The width of the frame.
GetHeight()uint32_t eSdkPro::Frame::GetHeight() const
Returns: The height of the frame.
GetPixelFormat()PIXEL_FORMAT eSdkPro::Frame::GetPixelFormat() const
Returns: The pixel format of the frame.
GetStride()uint32_t eSdkPro::Frame::GetStride() const
Returns: The number of bytes within a single row of the frame.
GetDataPtr()uint8_t* eSdkPro::Frame::GetDataPtr() const
Returns: The pointer to the start of the frame data.
GetDataSize()uint32_t eSdkPro::Frame::GetDataSize() const
Returns: The size of the valid frame data.
SetFrameId()void eSdkPro::Frame::SetFrameId(FrameId_t fid)
Sets The unique incrementing id of this frame.
Parameter: fid — The unique id of this frame.
GetFrameId()FrameId_t eSdkPro::Frame::GetFrameId() const
Returns: The unique incrementing id of this frame. May be used as a frame counter. The first frame received will have an id of 0. In the case where there are missing frames due such as when transmission errors occur, there will be gaps between subsequent frame ids.
SetTimestampNs()void eSdkPro::Frame::SetTimestampNs(TimestampNs_t ts)
Sets the timestamp in nanoseconds (ns) of this frame.
Parameter: ts — The timestamp in nanoseconds (ns) of this frame.
GetTimestampNs()TimestampNs_t eSdkPro::Frame::GetTimestampNs() const
Returns: The timestamp in nanoseconds (ns) of this frame. For frames received from the camera, the GVSP timestamp is converted to nanoseconds using the camera's timestamp tick frequency. When using PTP, the timestamp will be based off of the epoch of the master clock.
Get in touch with us today and our team of imaging professionals will be pleased to assist you.