Frame
Frame
A single frame of a video stream. More…
#include <frametype.h>
Inherits from BaseDataType
Public Functions
| Name | |
|---|---|
| Frame() | |
| Frame(const cv::Mat imgMat, const microseconds_t & t) | |
| Frame(const cv::Mat & imgMat, const uint64_t & idx, const microseconds_t & t) | |
| Frame(const uint64_t & idx) | |
| cv::Mat | copyMat() const |
| virtual ssize_t | memorySize() const override Calculate the size of the data in memory. |
| virtual bool | writeToMemory(void * memory, ssize_t size =-1) const override Write the data to a memory block. |
| virtual QByteArray | toBytes() const override Serialize the data to a byte array. |
| Frame | fromMemory(const void * buffer, size_t size) |
Public Attributes
| Name | |
|---|---|
| uint64_t | index |
| microseconds_t | time |
| cv::Mat | mat |
Additional inherited members
Public Types inherited from BaseDataType
| Name | |
|---|---|
| enum | TypeId { Unknown, ControlCommand, TableRow, Frame, FirmataControl, FirmataData, IntSignalBlock, FloatSignalBlock, Last} The TypeId enum. |
Public Functions inherited from BaseDataType
| Name | |
|---|---|
| QString | typeIdToString(TypeId value) |
| QString | typeIdToString(int value) |
| TypeId | typeIdFromString(const QString & str) |
| virtual TypeId | typeId() const =0 |
Detailed Description
struct Frame;A single frame of a video stream.
Describes a single frame in a stream of frames that make up a complete video. Each frame is timestamped with the exact time of its acquisition.
Public Functions Documentation
function Frame
inline explicit Frame()function Frame
inline explicit Frame(
const cv::Mat imgMat,
const microseconds_t & t
)function Frame
inline explicit Frame(
const cv::Mat & imgMat,
const uint64_t & idx,
const microseconds_t & t
)function Frame
inline explicit Frame(
const uint64_t & idx
)function copyMat
inline cv::Mat copyMat() constfunction memorySize
inline virtual ssize_t memorySize() const overrideCalculate the size of the data in memory.
Reimplements: BaseDataType::memorySize
Quickly calculate the maximum size this data occupies in memory. This will be used to allocate appropriate shared memory blocks in advance. Return -1 if the size is unknown.
function writeToMemory
inline virtual bool writeToMemory(
void * memory,
ssize_t size =-1
) const overrideWrite the data to a memory block.
Reimplements: BaseDataType::writeToMemory
Write the data to a memory block. The required size of the block is given by the memorySize() method, but a larger size can be passed if needed.
Return true if the data was written successfully.
function toBytes
inline virtual QByteArray toBytes() const overrideSerialize the data to a byte array.
Reimplements: BaseDataType::toBytes
Serialize the data to a byte array for local transmission.
function fromMemory
static inline Frame fromMemory(
const void * buffer,
size_t size
)Public Attributes Documentation
variable index
uint64_t index;variable time
microseconds_t time;variable mat
cv::Mat mat;Updated on 2025-11-01 at 00:13:00 +0000