#ifndef DEPTHGUIDE_ORB_CAMERA_H #define DEPTHGUIDE_ORB_CAMERA_H #include "core/cuda_helper.hpp" #include "core/object_manager.h" #include #include #include #include class orb_camera { public: ~orb_camera(); struct device_info { std::string sn_str; }; using device_info_list_type = std::vector; 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; 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 *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 pimpl; }; #endif //DEPTHGUIDE_ORB_CAMERA_H