| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- #ifndef DEPTHGUIDE_IMAGE_SAVER_IMPL_H
- #define DEPTHGUIDE_IMAGE_SAVER_IMPL_H
- #include "module/image_saver.h"
- #include "core/cuda_helper.hpp"
- using boost::asio::io_context;
- struct image_saver::impl {
- enum {
- SAVE_JPG,
- SAVE_PNG,
- SAVE_RAW,
- SAVE_PLY,
- };
- enum {
- DATA_IMG,
- DATA_PC
- };
- struct item_store_type {
- std::string ui_name;
- obj_name_type img_name;
- bool checked = false;
- int data_type = DATA_IMG;
- int save_type = SAVE_PNG;
- impl *par = nullptr;
- // for point cloud
- void save_ply();
- // for image
- void save_jpg();
- void save_png();
- void save_raw();
- void process();
- };
- using item_list_type = std::vector<item_store_type>;
- item_list_type item_list;
- io_context *ctx = nullptr;
- smart_cuda_stream stream;
- size_t save_cnt = 0;
- explicit impl(const create_config &conf);
- void show();
- void process_all();
- };
- #endif //DEPTHGUIDE_IMAGE_SAVER_IMPL_H
|