2021-06-10 19:18:34 +00:00
|
|
|
// Copyright 2019-2021, Collabora, Ltd.
|
|
|
|
// SPDX-License-Identifier: BSL-1.0
|
|
|
|
/*!
|
|
|
|
* @file
|
|
|
|
* @brief Interface header for DepthAI camera.
|
|
|
|
* @author Moses Turner <moses@collabora.com>
|
|
|
|
* @author Jakob Bornecrantz <jakob@collabora.com>
|
|
|
|
* @ingroup drv_depthai
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "xrt/xrt_frameserver.h"
|
2022-05-10 22:41:11 +00:00
|
|
|
#include "xrt/xrt_device.h"
|
|
|
|
#include "xrt/xrt_prober.h"
|
2021-06-10 19:18:34 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2022-02-10 16:54:55 +00:00
|
|
|
#undef DEPTHAI_HAS_MULTICAM_SUPPORT
|
|
|
|
|
2021-06-10 19:18:34 +00:00
|
|
|
|
2021-10-09 21:33:31 +00:00
|
|
|
struct t_stereo_camera_calibration;
|
|
|
|
|
|
|
|
|
2022-05-10 22:41:11 +00:00
|
|
|
#define DEPTHAI_VID 0x03e7
|
|
|
|
#define DEPTHAI_PID 0x2485
|
2022-09-21 11:27:38 +00:00
|
|
|
// FWIW, when the device is actively running, it reboots with the PID 0xf63b.
|
2022-05-10 22:41:11 +00:00
|
|
|
|
2022-09-21 11:27:38 +00:00
|
|
|
struct depthai_slam_startup_settings
|
|
|
|
{
|
|
|
|
bool want_cameras;
|
|
|
|
bool want_imu;
|
|
|
|
bool half_size_ov9282;
|
|
|
|
int frames_per_second;
|
|
|
|
};
|
2022-05-10 22:41:11 +00:00
|
|
|
|
|
|
|
int
|
|
|
|
depthai_3dof_device_found(struct xrt_prober *xp,
|
|
|
|
struct xrt_prober_device **devices,
|
|
|
|
size_t device_count,
|
|
|
|
size_t index,
|
|
|
|
cJSON *attached_data,
|
|
|
|
struct xrt_device **out_xdev);
|
|
|
|
|
2021-06-10 19:18:34 +00:00
|
|
|
/*!
|
|
|
|
* @defgroup drv_depthai DepthAI frameserver driver
|
|
|
|
* @ingroup drv
|
|
|
|
*
|
|
|
|
* @brief Frameserver for the DepthAI camera module.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* Create a DepthAI frameserver using a single RGB camera.
|
|
|
|
*
|
|
|
|
* @ingroup drv_depthai
|
|
|
|
*/
|
|
|
|
struct xrt_fs *
|
2021-10-13 21:25:49 +00:00
|
|
|
depthai_fs_monocular_rgb(struct xrt_frame_context *xfctx);
|
2021-06-10 19:18:34 +00:00
|
|
|
|
2021-10-09 21:22:13 +00:00
|
|
|
/*!
|
|
|
|
* Create a DepthAI frameserver using two gray cameras.
|
2022-05-04 13:38:54 +00:00
|
|
|
* Either OAK-D or OAK-D Lite. Custom FFC setups may or may not work.
|
2021-10-09 21:22:13 +00:00
|
|
|
*
|
|
|
|
* @ingroup drv_depthai
|
|
|
|
*/
|
|
|
|
struct xrt_fs *
|
2022-09-21 11:27:38 +00:00
|
|
|
depthai_fs_slam(struct xrt_frame_context *xfctx, struct depthai_slam_startup_settings *settings);
|
2022-02-10 16:54:55 +00:00
|
|
|
|
|
|
|
#ifdef DEPTHAI_HAS_MULTICAM_SUPPORT
|
|
|
|
/*!
|
|
|
|
* Create a DepthAI frameserver using two rgb cameras.
|
|
|
|
*
|
|
|
|
* @ingroup drv_depthai
|
|
|
|
*/
|
|
|
|
struct xrt_fs *
|
|
|
|
depthai_fs_stereo_rgb(struct xrt_frame_context *xfctx);
|
|
|
|
#endif
|
|
|
|
|
2021-10-09 21:33:31 +00:00
|
|
|
/*!
|
|
|
|
* Get the stereo calibration from a depthAI frameserver.
|
|
|
|
*
|
|
|
|
* @ingroup drv_depthai
|
|
|
|
*/
|
2021-10-12 14:37:26 +00:00
|
|
|
bool
|
2021-10-09 21:33:31 +00:00
|
|
|
depthai_fs_get_stereo_calibration(struct xrt_fs *xfs, struct t_stereo_camera_calibration **c_ptr);
|
|
|
|
|
2021-06-10 19:18:34 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|