mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-06 07:06:10 +00:00
a/tracking: Tidy and document FrameMat [NFC]
This commit is contained in:
parent
920949ecae
commit
e9d8e0db21
|
@ -1,4 +1,4 @@
|
||||||
// Copyright 2021, Collabora, Ltd.
|
// Copyright 2021-2023, Collabora, Ltd.
|
||||||
// SPDX-License-Identifier: BSL-1.0
|
// SPDX-License-Identifier: BSL-1.0
|
||||||
/*!
|
/*!
|
||||||
* @file
|
* @file
|
||||||
|
@ -15,12 +15,15 @@
|
||||||
namespace xrt::auxiliary::tracking {
|
namespace xrt::auxiliary::tracking {
|
||||||
|
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* This class implements the @ref xrt_frame interface, allowing interfacing to
|
||||||
|
* @p cv::Mat from C code. Keeps a reference to the cv::Mat and so the data
|
||||||
|
* alive, this class is freed when the reference count reaches zero.
|
||||||
|
*/
|
||||||
class FrameMat
|
class FrameMat
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/*!
|
//! Additional optional parameters for frame creation.
|
||||||
* Additional optional parameters for frame creation.
|
|
||||||
*/
|
|
||||||
class Params
|
class Params
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -28,16 +31,14 @@ public:
|
||||||
uint64_t timestamp_ns;
|
uint64_t timestamp_ns;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//! Exposed @ref xrt_frame API.
|
||||||
|
|
||||||
// Exposed to the C api.
|
|
||||||
struct xrt_frame frame = {};
|
struct xrt_frame frame = {};
|
||||||
|
|
||||||
// The cv::Mat that holds the data.
|
// The cv::Mat that holds the data.
|
||||||
cv::Mat matrix = cv::Mat();
|
cv::Mat matrix = cv::Mat();
|
||||||
|
|
||||||
|
|
||||||
|
public: // Methods
|
||||||
/*!
|
/*!
|
||||||
* Only public due to C needed to destroy it.
|
* Only public due to C needed to destroy it.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue