| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- #ifndef DEPTHGUIDE_ORB_CAMERA_H
- #define DEPTHGUIDE_ORB_CAMERA_H
- #include "core/cuda_helper.hpp"
- #include "core/object_manager.h"
- #include <boost/asio/io_context.hpp>
- #include <memory>
- #include <thread>
- #include <vector>
- class orb_camera {
- public:
- ~orb_camera();
- struct device_info {
- std::string sn_str;
- };
- using device_info_list_type = std::vector<device_info>;
- static device_info_list_type query_device_info();
- struct create_config {
- const char *sn_str = nullptr; // serial number
- smart_cuda_stream *stream = nullptr;
- boost::asio::io_context *ctx = nullptr;
- };
- using this_type = orb_camera;
- using pointer = std::unique_ptr<this_type>;
- static pointer create(create_config conf);
- struct video_info {
- uint32_t index = 0;
- const char *fmt_name = nullptr;
- uint32_t fps = 0, width = 0, height = 0;
- explicit operator std::string();
- };
- enum video_type {
- V_COLOR, V_DEPTH
- };
- std::vector<video_info> *query_video_info(video_type type);
- struct start_config {
- struct color_config_type {
- bool enable = true;
- uint32_t config_index = 0;
- obj_name_type name = -1;
- } color;
- struct depth_config_type {
- bool enable = true;
- uint32_t config_index = 0;
- obj_name_type name = -1;
- } depth;
- };
- bool start(start_config conf);
- void stop();
- bool is_capturing() const;
- private:
- struct impl;
- std::unique_ptr<impl> pimpl;
- };
- #endif //DEPTHGUIDE_ORB_CAMERA_H
|