Auterion App SDK
Auterion SDK is a library that can be used by AuterionOS apps to communicate with the system.
Loading...
Searching...
No Matches
camera.hpp
1/****************************************************************************
2 *
3 * Copyright 2023-2026 Auterion AG. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright notice, this
9 * list of conditions and the following disclaimer.
10 *
11 * 2. Redistributions in binary form must reproduce the above copyright notice,
12 * this list of conditions and the following disclaimer in the documentation
13 * and/or other materials provided with the distribution.
14 *
15 * 3. Neither the name of the copyright holder nor the names of its contributors
16 * may be used to endorse or promote products derived from this software without
17 * specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
23 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE.
30 *
31 ****************************************************************************/
32
33#pragma once
34
35#ifdef ROS_DISTRO_IS_ROLLING
36#include <tf2_ros/transform_listener.hpp>
37#else
38#include <tf2_ros/transform_listener.h>
39#endif
40
41#include <Eigen/Eigen>
42#include <auterion_core_msgs/msg/camera_info.hpp>
43#include <auterion_core_msgs/msg/image8m.hpp>
44#include <chrono>
45#include <functional>
46#include <opencv2/core/mat.hpp>
47#include <rclcpp/rclcpp.hpp>
48#include <sensor_msgs/msg/camera_info.hpp>
49#include <string>
50#include <utility>
51
52#include "camera_control.hpp"
53
54namespace auterion {
58using namespace std::chrono_literals;
59
60class SDK;
61class CameraMonitorImpl;
62class CameraImpl;
63
69 ImageHeader() = default;
70
72 enum class Encoding {
73 Unknown,
74 Y800,
75 Y16,
76 UYVY,
77 YUY2,
78 I420,
79 NV12,
80 RGB8,
81 BGR8,
83 BA81,
84 GBRG,
85 GRBG,
86 RGGB,
87 RGBA
88 };
89
90 ImageHeader(int width_, int height_, Encoding encoding_, int step_ = 0);
91
92 template <typename ImageT = auterion_core_msgs::msg::Image8m>
93 explicit ImageHeader(const ImageT& image)
94 : width(image.width), height(image.height), step(image.step), timestamp(image.stamp) {
95 const int encoding_len =
96 strnlen(reinterpret_cast<const char*>(image.encoding.data()), image.encoding.size());
97 const std::string encoding_str(reinterpret_cast<const char*>(image.encoding.data()),
98 encoding_len);
99 if (encoding_str == "mono8") {
100 encoding = Encoding::Y800;
101 } else if (encoding_str == "mono16") {
102 encoding = Encoding::Y16;
103 } else if (encoding_str == "uyvy") {
104 encoding = Encoding::UYVY;
105 } else if (encoding_str == "yuyv") {
106 encoding = Encoding::YUY2;
107 } else if (encoding_str == "i420") {
108 // (This does not exist in ROS:
109 // https://github.com/ros2/common_interfaces/blob/master/sensor_msgs/include/sensor_msgs/image_encodings.hpp)
110 encoding = Encoding::I420;
111 } else if (encoding_str == "nv12") {
112 // Does not exist in ROS 2
113 encoding = Encoding::NV12;
114 } else if (encoding_str == "rgb8") {
115 encoding = Encoding::RGB8;
116 } else if (encoding_str == "rgba8") {
117 encoding = Encoding::RGBA;
118 } else if (encoding_str == "bgr8") {
119 encoding = Encoding::BGR8;
120 } else if (encoding_str == "bayer_bggr8") {
121 encoding = Encoding::BA81;
122 } else if (encoding_str == "bayer_gbrg8") {
123 encoding = Encoding::GBRG;
124 } else if (encoding_str == "bayer_grbg8") {
125 encoding = Encoding::GRBG;
126 } else if (encoding_str == "bayer_rggb8") {
127 encoding = Encoding::RGGB;
128 }
129 }
130
131 template <typename ImageT = auterion_core_msgs::msg::Image8m>
132 void toImage(ImageT& image) {
133 image.width = width;
134 image.height = height;
135 image.step = step;
136 image.stamp = timestamp;
137 switch (encoding) {
138 case Encoding::Unknown:
139 strncpy(reinterpret_cast<char*>(image.encoding.data()), "unknown",
140 image.encoding.size());
141 break;
142 case Encoding::Y800:
143 strncpy(reinterpret_cast<char*>(image.encoding.data()), "mono8",
144 image.encoding.size());
145 break;
146 case Encoding::Y16:
147 strncpy(reinterpret_cast<char*>(image.encoding.data()), "mono16",
148 image.encoding.size());
149 break;
150 case Encoding::UYVY:
151 strncpy(reinterpret_cast<char*>(image.encoding.data()), "uyvy",
152 image.encoding.size());
153 break;
154 case Encoding::YUY2:
155 strncpy(reinterpret_cast<char*>(image.encoding.data()), "yuyv",
156 image.encoding.size());
157 break;
158 case Encoding::I420:
159 strncpy(reinterpret_cast<char*>(image.encoding.data()), "i420",
160 image.encoding.size());
161 break;
162 case Encoding::NV12:
163 strncpy(reinterpret_cast<char*>(image.encoding.data()), "nv12",
164 image.encoding.size());
165 break;
166 case Encoding::RGB8:
167 strncpy(reinterpret_cast<char*>(image.encoding.data()), "rgb8",
168 image.encoding.size());
169 break;
170 case Encoding::BGR8:
171 strncpy(reinterpret_cast<char*>(image.encoding.data()), "bgr8",
172 image.encoding.size());
173 break;
174 case Encoding::RGBA:
175 strncpy(reinterpret_cast<char*>(image.encoding.data()), "rgba8",
176 image.encoding.size());
177 break;
178 case Encoding::BA81:
179 strncpy(reinterpret_cast<char*>(image.encoding.data()), "bayer_bggr8",
180 image.encoding.size());
181 break;
182 case Encoding::GBRG:
183 strncpy(reinterpret_cast<char*>(image.encoding.data()), "bayer_gbrg8",
184 image.encoding.size());
185 break;
186 case Encoding::GRBG:
187 strncpy(reinterpret_cast<char*>(image.encoding.data()), "bayer_grbg8",
188 image.encoding.size());
189 break;
190 case Encoding::RGGB:
191 strncpy(reinterpret_cast<char*>(image.encoding.data()), "bayer_rggb8",
192 image.encoding.size());
193 break;
194 }
195 }
196
197 size_t planeOffset(int plane) const;
198 size_t planeSizeBytes(int plane) const;
199 size_t imageSizeBytes() const;
200
201 int width{};
202 int height{};
203 int step{};
204 Encoding encoding{Encoding::Unknown};
205
206 rclcpp::Time timestamp{};
207 std::optional<uint64_t> monotonic_timestamp_us{std::nullopt};
208 uint32_t frame_id{};
209
213 std::optional<rclcpp::Time> mid_exposure_timestamp{std::nullopt};
214 uint32_t exposure_time_us{};
219 int32_t readout_us{};
220
221 float framerate{0.f};
222
223 sensor_msgs::msg::CameraInfo camera_info{};
224};
225
226std::ostream& operator<<(std::ostream& os, const ImageHeader::Encoding& encoding);
227
232class Image {
233 public:
234 Image(ImageHeader header, uint8_t* data) : _header(std::move(header)), _data(data) {}
235
236 const ImageHeader& header() const { return _header; }
237
238 uint8_t* data() { return _data; }
239 const uint8_t* data() const { return _data; }
240
241 int width() const { return _header.width; }
242 int height() const { return _header.height; }
243
248 cv::Mat asOpenCVMat(int plane = -1) const;
249
250 private:
251 ImageHeader _header{};
252 uint8_t* _data{nullptr};
253};
254
262class ImageFD {
263 public:
264 ImageFD(ImageHeader header, int fd, uint64_t buffer_size,
265 std::function<void()> release_function, uint8_t* buffer = nullptr,
266 std::function<void()> discard_function = nullptr)
267 : _header(std::move(header)),
268 _fd(fd),
269 _buffer_size(buffer_size),
270 _buffer(buffer),
271 _release_function(std::move(release_function)),
272 _discard_function(std::move(discard_function)) {}
273
274 ~ImageFD() { release(); }
275
276 // Delete copy operations
277 // Copying an ImageFD is not allowed since it contains an FD that should be uniquely owned.
278 ImageFD(const ImageFD&) = delete;
279 ImageFD& operator=(const ImageFD&) = delete;
280
281 // Move constructor
282 ImageFD(ImageFD&& other) noexcept
283 : _header(std::move(other._header)),
284 _fd(other._fd),
285 _buffer_size(other._buffer_size),
286 _buffer(other.buffer()),
287 _release_function(std::move(other._release_function)),
288 _discard_function(std::move(other._discard_function)),
289 _was_released(other._was_released) {
290 other._fd = -1;
291 other._buffer_size = 0;
292 other._buffer = nullptr;
293 other._release_function = nullptr;
294 other._discard_function = nullptr;
295 other._was_released = true;
296 }
297
298 // Move assignment operator
299 ImageFD& operator=(ImageFD&& other) noexcept {
300 if (this != &other) {
301 // Release the current object first to avoid leaking the old fd/callback
302 release();
303 _header = std::move(other._header);
304 _fd = other._fd;
305 _buffer_size = other._buffer_size;
306 _buffer = other._buffer;
307 _release_function = std::move(other._release_function);
308 _discard_function = std::move(other._discard_function);
309 _was_released = other._was_released;
310 other._fd = -1;
311 other._buffer_size = 0;
312 other._buffer = nullptr;
313 other._release_function = nullptr;
314 other._discard_function = nullptr;
315 other._was_released = true;
316 }
317 return *this;
318 }
319
320 const ImageHeader& header() const { return _header; }
321
322 int fd() const { return _fd; }
323
324 uint64_t bufferSize() const { return _buffer_size; }
325
326 uint8_t* buffer() const { return _buffer; }
327
328 /*
329 * Release the FD, signalling that the buffer is no longer in use.
330 */
331 void release() {
332 if (_release_function) {
333 _release_function();
334 _release_function = nullptr;
335 }
336 _fd = -1;
337 _buffer = nullptr;
338 _was_released = true;
339 }
340
341 bool wasReleased() const { return _was_released; }
342
343 /*
344 * Mark a replacement buffer to be reclaimed without rendering (the compose never happened). The
345 * buffer is still forwarded on release; the producer just discards it. No-op for
346 * non-replacement images.
347 */
348 void discard() {
349 if (_discard_function) {
350 _discard_function();
351 _discard_function = nullptr;
352 }
353 }
354
355 private:
356 ImageHeader _header{};
357 int _fd{-1};
358 uint64_t _buffer_size{0};
359 uint8_t* _buffer{nullptr};
360
367 std::function<void()> _release_function{nullptr};
368
370 std::function<void()> _discard_function{nullptr};
371
372 bool _was_released{false};
373};
374
380 enum class SensorType {
381 Unknown = 0,
382 Monochrome = 1,
383 RGB = 2,
384 Depth = 3,
385 RGBD = 4,
386 IR = 5,
387 };
388 enum class MountOrientation {
389 Unknown = 0,
390 Dynamic = 1,
391 Forward = 2,
392 Backward = 3,
393 Upward = 4,
394 Downward = 5,
395 Leftward = 6,
396 Rightward = 7,
397 };
398 enum class MountOrientationDetail {
399 Unknown = 0,
400 Left = 1,
401 Right = 2,
402 Upper = 3,
403 Lower = 4,
404 };
405 enum class PrimaryPurpose {
406 Unknown = 0,
407 Generic = 1,
408 OpticalFlow = 2,
409 VIO = 3,
410 FPV = 4,
411 Survey = 5,
412 Tracking = 6,
413 };
414 enum class ImageRotation : uint8_t {
415 None = 0,
416 Rotation90Clockwise = 1,
417 Rotation180 = 2,
418 Rotation270Clockwise = 3,
419 };
421 Eigen::Quaterniond rotation{-0.5, 0.5, -0.5, 0.5}; // {q, x, y, z} default front facing
422 Eigen::Vector3d translation{0.0, 0.0, 0.0};
423 };
424
425 CameraDescriptor() = default;
426 explicit CameraDescriptor(const auterion_core_msgs::msg::CameraInfo& camera_info);
427
428 operator auterion_core_msgs::msg::CameraInfo() const;
429
430 std::string device_driver;
431 std::string device_identifier;
432
433 std::string unique_hash;
434 std::string unique_name;
435
436 std::string camera_model;
437
438 SensorType sensor_type{SensorType::Unknown};
439 MountOrientation mount_orientation{MountOrientation::Unknown};
440 MountOrientationDetail mount_orientation_detail{MountOrientationDetail::Unknown};
441 PrimaryPurpose primary_purpose{PrimaryPurpose::Unknown};
442 ImageRotation image_rotation{ImageRotation::None};
443 ExtrinsicCalibration extrinsic_calibration;
444};
445
452 enum class Mode { None, Point, Rectangle };
453
454 bool active{false};
455 bool coasting{false};
456 bool error{false};
457 Mode mode{Mode::None};
458 float point_x{0.F};
459 float point_y{0.F};
460 float radius{0.F};
461 float rectangle_top_x{0.F};
462 float rectangle_top_y{0.F};
463 float rectangle_bottom_x{0.F};
464 float rectangle_bottom_y{0.F};
465 unsigned resolution_x{0};
466 unsigned resolution_y{0};
467 unsigned hfov_deg{0};
468};
469
476 uint64_t session_id{0};
477};
478
480 bool output_enabled{false};
481};
482
490 public:
491 using NotificationCallback = std::function<void(const CameraDescriptor&)>;
492
493 CameraMonitor(SDK& sdk, const NotificationCallback& on_camera_added,
494 const NotificationCallback& on_camera_removed = nullptr);
495
496 ~CameraMonitor() = default;
497
498 private:
499 std::shared_ptr<CameraMonitorImpl> _impl;
500};
501
506class Camera {
507 public:
508 Camera(SDK& sdk, const CameraDescriptor& camera_descriptor);
509 Camera(std::shared_ptr<CameraImpl> impl);
510 ~Camera() = default;
511
516 const std::function<bool(const CameraDescriptor&)>& find_callback);
517
518 [[deprecated(
519 "waitForCamera with 'camera_descriptor' not used anymore. This will be removed in some "
520 "later release.")]] static Camera
521 waitForCamera(SDK& sdk,
522 std::optional<auterion::CameraDescriptor> camera_descriptor = std::nullopt);
523
524 static std::optional<Camera> open(SDK& sdk, const std::string& unique_name,
525 const std::chrono::seconds& timeout = 30s);
526 static std::optional<Camera> open(
527 SDK& sdk, const std::function<bool(const CameraDescriptor&)>& find_callback,
528 const std::chrono::seconds& timeout = 30s);
529 static std::optional<Camera> openFirst(SDK& sdk, const std::chrono::seconds& timeout = 30s);
530
531 using ImageCallback = std::function<void(const Image& image)>;
532 using ImageFDCallback = std::function<void(const std::shared_ptr<ImageFD>& image_fd)>;
533 using CameraInfoAfterSwitchCallback =
534 std::function<void(const sensor_msgs::msg::CameraInfo::SharedPtr& camera_info)>;
535 using TrackingStatusCallback = std::function<void(const TrackingStatus& status)>;
536 using ServiceStatusCallback = std::function<void(const CameraServiceStatus& status)>;
537 using CameraStatusCallback = std::function<void(const CameraStatus& status)>;
538
544 void subscribeImage(const ImageCallback& callback);
545
561 void subscribeImageFD(const ImageFDCallback& callback, float max_rate_hz = 0.0F);
562
580 void setImagesPaused(bool paused);
581
583 enum class PixelFormat {
584 SameAsImage,
585 NV12,
586 RGBA,
587 YUYV,
588 };
589
591
592 std::chrono::milliseconds timeout =
593 300ms;
598 PixelFormat pixel_format{PixelFormat::SameAsImage};
603
604 ImageReplacementOptions& withTimeout(std::chrono::milliseconds timeout_val) {
605 timeout = timeout_val;
606 return *this;
607 }
608
609 ImageReplacementOptions& withPixelFormat(PixelFormat format) {
610 pixel_format = format;
611 return *this;
612 }
613
614 ImageReplacementOptions& withUseOutputImageSize(bool use) {
616 return *this;
617 }
618 };
619
629 void deactivateImageReplacement();
630
638 void interestedInReplacement(bool interested = true);
639
655 std::optional<ImageFD> getReplacementImage(const ImageFD& image);
656
668 std::optional<ImageFD> getReplacementImage(uint32_t original_frame_id);
669
681 std::chrono::steady_clock::time_point lastReplacementImageOffer() const;
682
683 [[deprecated(
684 "subscribeCameraInfo() is deprecated and will be removed in a future release. The "
685 "CameraInfo is instead included in the image header obtained with subscribeImage(), and "
686 "can also be queried with getCameraInfo().")]] void
687 subscribeCameraInfo(
688 std::function<void(const sensor_msgs::msg::CameraInfo::SharedPtr)> callback);
689
695 void subscribeCameraInfoAfterSwitch(const CameraInfoAfterSwitchCallback& callback);
696
704 void subscribeTrackingStatus(TrackingStatusCallback callback);
705
712 void subscribeServiceStatus(ServiceStatusCallback callback);
713
722 void subscribeCameraStatus(CameraStatusCallback callback);
723
732 bool cameraInfoValid() const;
733
742 std::optional<cv::Size> getLastImageSize() const;
743
750 Eigen::Vector3d unprojectImagePoint(const cv::Point& image_point) const;
751
766 bool getPoseBodyCamera(Eigen::Quaterniond& q_body_camera, Eigen::Vector3d& t_body_camera) const;
767
769 bool getPoseBodyCamera(Eigen::Quaterniond& q_body_camera, Eigen::Vector3d& t_body_camera,
770 const tf2::TimePoint& time) const;
771
790 bool getPoseWorldCamera(Eigen::Quaterniond& q_enu_camera, Eigen::Vector3d& t_enu_camera,
791 const tf2::TimePoint& time = tf2::TimePointZero) const;
792
825 bool getDeltaRotationWorldCamera(Eigen::Quaterniond& q_delta_world_camera,
826 tf2::TimePoint& time_start, tf2::TimePoint& time_end);
827
836 bool getCameraInfo(sensor_msgs::msg::CameraInfo& camera_info) const;
837
848 bool getCameraInfoDirect(sensor_msgs::msg::CameraInfo& camera_info) const;
849
859 bool switchTo(const std::function<bool(const CameraDescriptor&)>& find_callback);
860
865
866 CameraControl& control();
867
871 bool usesImageSession() const;
872
873 private:
874 std::shared_ptr<CameraImpl> _impl;
875};
876
878} // namespace auterion
Definition camera_control.hpp:17
Monitor for new or removed cameras, of both camera protocols. Existing cameras are reported from the ...
Definition camera.hpp:489
Camera client to subscribe to a camera image stream.
Definition camera.hpp:506
void setImagesPaused(bool paused)
Stop or resume image delivery without giving up the subscription.
std::optional< ImageFD > getReplacementImage(const ImageFD &image)
Get a replacement image buffer.
const CameraDescriptor & descriptor() const
Get the descriptor of the active camera source.
bool cameraInfoValid() const
Determine whether a camera info message contains valid data.
void interestedInReplacement(bool interested=true)
Indicate interest in activating image replacement.
void subscribeServiceStatus(ServiceStatusCallback callback)
Subscribe to the status of the service providing this camera.
void subscribeCameraInfoAfterSwitch(const CameraInfoAfterSwitchCallback &callback)
Subscribe to camera info updates emitted once after each successful stream switch.
bool getCameraInfo(sensor_msgs::msg::CameraInfo &camera_info) const
Get the camera information data for the camera.
bool getPoseBodyCamera(Eigen::Quaterniond &q_body_camera, Eigen::Vector3d &t_body_camera) const
Get the pose of the camera with respect to the body frame.
bool usesImageSession() const
bool getPoseBodyCamera(Eigen::Quaterniond &q_body_camera, Eigen::Vector3d &t_body_camera, const tf2::TimePoint &time) const
Camera pose in body FLU at the requested capture time.
void subscribeImage(const ImageCallback &callback)
void subscribeCameraStatus(CameraStatusCallback callback)
Subscribe to the camera status.
std::optional< ImageFD > getReplacementImage(uint32_t original_frame_id)
Get a replacement image buffer by the original frame's id.
Eigen::Vector3d unprojectImagePoint(const cv::Point &image_point) const
Determine the (relative) camera-frame 3D position of a point in an image.
bool getDeltaRotationWorldCamera(Eigen::Quaterniond &q_delta_world_camera, tf2::TimePoint &time_start, tf2::TimePoint &time_end)
Calculates how much the camera has rotated between two points in time based only on gyro data.
std::optional< cv::Size > getLastImageSize() const
Returns the size of the last received image, if available.
bool getCameraInfoDirect(sensor_msgs::msg::CameraInfo &camera_info) const
get the camera info directly from the camera
static Camera waitForCamera(SDK &sdk, const std::function< bool(const CameraDescriptor &)> &find_callback)
void subscribeTrackingStatus(TrackingStatusCallback callback)
Subscribe to the status of the tracking on this camera.
bool switchTo(const std::function< bool(const CameraDescriptor &)> &find_callback)
Switch active UnixFD input to a discovered camera selected by callback.
bool getPoseWorldCamera(Eigen::Quaterniond &q_enu_camera, Eigen::Vector3d &t_enu_camera, const tf2::TimePoint &time=tf2::TimePointZero) const
Get the pose of the camera with respect to the ENU world frame.
std::chrono::steady_clock::time_point lastReplacementImageOffer() const
When the camera service last offered a replacement image buffer.
void activateImageReplacement(const ImageReplacementOptions &options=ImageReplacementOptions())
Activate image replacement.
Definition camera.hpp:262
Contains image data with a specific encoding.
Definition camera.hpp:232
cv::Mat asOpenCVMat(int plane=-1) const
SDK execution class. All callbacks are called on the same thread.
Definition auterion.hpp:133
Struct describing a camera configuration.
Definition camera.hpp:379
The status the service providing a camera (e.g. video-service) reports for it, about once a second.
Definition camera.hpp:475
uint64_t session_id
changes when the service (re)starts the camera
Definition camera.hpp:476
Definition camera.hpp:479
bool output_enabled
If true, the camera streams images (to a GCS)
Definition camera.hpp:480
bool use_output_image_size
or equal to the subscription image size)
Definition camera.hpp:600
PixelFormat pixel_format
Definition camera.hpp:598
PixelFormat
Definition camera.hpp:583
std::chrono::milliseconds timeout
Definition camera.hpp:592
Contains image metadata.
Definition camera.hpp:68
int step
full row size in bytes
Definition camera.hpp:203
uint32_t frame_id
incremental frame id
Definition camera.hpp:208
std::optional< rclcpp::Time > mid_exposure_timestamp
Definition camera.hpp:213
uint32_t exposure_time_us
Definition camera.hpp:214
std::optional< uint64_t > monotonic_timestamp_us
hardware timestamp [μs]
Definition camera.hpp:207
Encoding
Image encoding, following FourCC.
Definition camera.hpp:72
@ NV12
YUV 4:2:0, https://fourcc.org/pixel-format/yuv-nv12/.
@ Y800
8 bit monochrome image (GREY), https://fourcc.org/pixel-format/yuv-y800/
@ Y16
16 bit monochrome image, https://fourcc.org/pixel-format/yuv-y16/
@ BA81
8-bit Bayer (https://docs.kernel.org/userspace-api/media/v4l/pixfmt-srggb8.html)
@ UYVY
YUV 4:2:2, https://fourcc.org/pixel-format/yuv-uyvy/.
@ YUY2
YUV 4:2:2 (YUYV), https://fourcc.org/pixel-format/yuv-yuy2/.
@ I420
YUV 4:2:0, https://fourcc.org/pixel-format/yuv-i420/.
@ RGBA
32-bit RGBA used for rendering
int32_t readout_us
Definition camera.hpp:219
The status of the tracking on a camera, as the app tracking on it reports it (see TrackingInterface)....
Definition camera.hpp:451
float rectangle_top_x
Mode::Rectangle.
Definition camera.hpp:461
unsigned resolution_x
the displayed resolution, 0 if unknown
Definition camera.hpp:465
bool coasting
the target is obscured, its position predicted
Definition camera.hpp:455
float point_x
Mode::Point.
Definition camera.hpp:458
bool active
a target is tracked (or coasting)
Definition camera.hpp:454
unsigned hfov_deg
the displayed horizontal field of view, 0 if unknown
Definition camera.hpp:467