| 1234567891011121314151617181920212223242526272829303132333435 |
- #ifndef HDRSYNTHESIS_HDR_SYNTHESIS_H
- #define HDRSYNTHESIS_HDR_SYNTHESIS_H
- #include <opencv2/core/cuda.hpp>
- #include <cstdint>
- #include <memory>
- static constexpr auto default_pyramid_level = 6;
- class hdr_buffer;
- // TODO: use half precision float point number to further optimize
- class hdr_synthesizer {
- public:
- explicit hdr_synthesizer(cv::Size size, uint8_t pyramid_level = default_pyramid_level,
- cv::cuda::Stream &stream = cv::cuda::Stream::Null());
- ~hdr_synthesizer();
- hdr_buffer *malloc_buffer(); // per image buffer
- static void free_buffer(hdr_buffer *buf);
- void preprocess_image(hdr_buffer *buf, cv::InputArray img_dev);
- void merge_image(hdr_buffer *buf_a, hdr_buffer *buf_b, cv::OutputArray img_dev_out);
- private:
- struct impl;
- std::unique_ptr<impl> pimpl;
- };
- #endif //HDRSYNTHESIS_HDR_SYNTHESIS_H
|