Simulated Reality SDK 7500c78d v1.30.2.51085 2024-04-26T11:23:03Z
Stable
videoframe.h
Go to the documentation of this file.
1
10#pragma once
11
12#ifdef __cplusplus
13#include <memory>
14#include "opencv2/core/mat.hpp"
15#endif
16
22typedef struct {
23 uint64_t frameId;
24 uint64_t time;
25 uint64_t streamId;
26 uint64_t channels;
27 uint64_t height;
28 uint64_t width;
29 int64_t valueType;
30
31 uint64_t cropY;
32 uint64_t cropX;
34 uint64_t originalWidth;
35
36 void *data;
38
39#ifdef __cplusplus
40namespace SR {
41
51public:
52 uint64_t frameId;
53 uint64_t time;
54 uint64_t streamId;
55 std::shared_ptr<cv::Mat> image;
56
57 operator SR_videoFrame() {
58 return {
59 frameId,
60 time,
62 (uint64_t)image->channels(),
63 (uint64_t)image->size().height,
64 (uint64_t)image->size().width,
65 image->type(),
66 0, 0, 0, 0,
67 image->data,
68 };
69 }
70};
71
72}
73#endif
Class containing an image recorded by a Camera.
Definition: videoframe.h:50
uint64_t time
Definition: videoframe.h:53
uint64_t streamId
Definition: videoframe.h:54
uint64_t frameId
Definition: videoframe.h:52
std::shared_ptr< cv::Mat > image
Definition: videoframe.h:55
Namespace containing all C++ Simulated Reality classes.
Definition: srconfiguration.h:25
C-compatible struct containing an image recorded by a Camera.
Definition: videoframe.h:22
uint64_t streamId
Definition: videoframe.h:25
uint64_t channels
Definition: videoframe.h:26
int64_t valueType
Definition: videoframe.h:29
uint64_t originalWidth
Definition: videoframe.h:34
void * data
Definition: videoframe.h:36
uint64_t originalHeight
Definition: videoframe.h:33
uint64_t time
Definition: videoframe.h:24
uint64_t frameId
Definition: videoframe.h:23
uint64_t cropX
Definition: videoframe.h:32
uint64_t cropY
Definition: videoframe.h:31
uint64_t height
Definition: videoframe.h:27
uint64_t width
Definition: videoframe.h:28