| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- #ifndef DEPTHGUIDE_IMAGE_AUGMENT_HELPER_H
- #define DEPTHGUIDE_IMAGE_AUGMENT_HELPER_H
- #include "core/object_manager.h"
- #include "render/render_utility.h"
- #include <boost/container/small_vector.hpp>
- #include <memory>
- class image_augment_helper {
- public:
- struct create_config {
- obj_name_type in_name = invalid_obj_name;
- obj_name_type out_name = invalid_obj_name;
- static constexpr auto reserve_cnt = 4;
- using render_func_type = std::function<void()>;
- using render_func_list_type =
- boost::container::small_vector<render_func_type, reserve_cnt>;
- render_func_list_type render_func_list;
- using fbo_config_type = smart_frame_buffer::create_config;
- fbo_config_type fbo_conf;
- bool flip_image = false;
- bool follow_image_size = true;
- smart_cuda_stream *stream = nullptr;
- };
- explicit image_augment_helper(const create_config &conf);
- ~image_augment_helper();
- void resize(cv::Size size);
- private:
- struct impl;
- std::unique_ptr<impl> pimpl;
- };
- class stereo_augment_helper {
- public:
- struct create_config {
- obj_name_type left_name = invalid_obj_name;
- obj_name_type right_name = invalid_obj_name;
- obj_name_type out_name = invalid_obj_name;
- cv::Size fbo_size;
- bool flip_image = false;
- smart_cuda_stream *stream = nullptr;
- };
- explicit stereo_augment_helper(const create_config &conf);
- ~stereo_augment_helper();
- void resize(cv::Size size);
- struct ui_config {
- bool follow_image_size = false;
- bool enable_halve_width = false;
- };
- void fix_ui_config(ui_config conf);
- void show();
- private:
- struct impl;
- std::unique_ptr<impl> pimpl;
- };
- #endif //DEPTHGUIDE_IMAGE_AUGMENT_HELPER_H
|