#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 // image_ptr, CV_32FC2 // an image that maps each pixel to its undistorted position in the normalized plane obj_name_type remap_name = invalid_obj_name; // obj_name_type camera_intrinsic_name = invalid_obj_name; // camera_intrinsic_v2 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 }; using vi_list_ptr = std::shared_ptr>; vi_list_ptr query_video_info(video_type type); vi_list_ptr query_d2c_info(uint32_t c_conf_index); // color config index 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