ACMX 2.139.0
Dual-Backend Real-Time GPU Video Synthesis
Loading...
Searching...
No Matches
edge_dnn.hpp
Go to the documentation of this file.
1#ifndef ACMXVK_EDGE_DNN_HPP
2#define ACMXVK_EDGE_DNN_HPP
3
4#include <memory>
5#include <string>
6
7#include <opencv2/core/mat.hpp>
8
9namespace acmxvk::dnn {
10
12 public:
13 explicit GenericOnnxProcessor(const std::string &configuration_path);
15
18
19 void process(const cv::Mat &image, cv::Mat &result);
20
21 private:
22 struct Impl;
23 std::unique_ptr<Impl> impl;
24 };
25
27 public:
28 explicit EdgeDetector(const std::string &model_path);
30
31 EdgeDetector(const EdgeDetector &) = delete;
33
34 void process(const cv::Mat &image, cv::Mat &result);
35
36 private:
37 struct Impl;
38 std::unique_ptr<Impl> impl;
39 };
40
42 public:
43 explicit HumanSegmenter(const std::string &model_path);
45
46 HumanSegmenter(const HumanSegmenter &) = delete;
48
49 [[nodiscard]] cv::Mat infer(const cv::Mat &image);
50
51 private:
52 struct Impl;
53 std::unique_ptr<Impl> impl;
54 };
55
56 [[nodiscard]] cv::Mat hardenedAlphaMask(const cv::Mat &image, const cv::Mat &mask, float black_point, float white_point);
57 [[nodiscard]] cv::Mat isolateBody(const cv::Mat &image, const cv::Mat &mask, float black_point, float white_point);
58
59} // namespace acmxvk::dnn
60
61#endif
EdgeDetector & operator=(const EdgeDetector &)=delete
EdgeDetector(const EdgeDetector &)=delete
EdgeDetector(const std::string &model_path)
Definition edge_dnn.cpp:568
void process(const cv::Mat &image, cv::Mat &result)
Definition edge_dnn.cpp:572
std::unique_ptr< Impl > impl
Definition edge_dnn.hpp:38
std::unique_ptr< Impl > impl
Definition edge_dnn.hpp:23
void process(const cv::Mat &image, cv::Mat &result)
Definition edge_dnn.cpp:522
GenericOnnxProcessor & operator=(const GenericOnnxProcessor &)=delete
GenericOnnxProcessor(const std::string &configuration_path)
Definition edge_dnn.cpp:518
GenericOnnxProcessor(const GenericOnnxProcessor &)=delete
cv::Mat infer(const cv::Mat &image)
Definition edge_dnn.cpp:634
HumanSegmenter & operator=(const HumanSegmenter &)=delete
HumanSegmenter(const std::string &model_path)
Definition edge_dnn.cpp:630
HumanSegmenter(const HumanSegmenter &)=delete
std::unique_ptr< Impl > impl
Definition edge_dnn.hpp:53
cv::Mat hardenedAlphaMask(const cv::Mat &image, const cv::Mat &mask, float black_point, float white_point)
Definition edge_dnn.cpp:636
cv::Mat isolateBody(const cv::Mat &image, const cv::Mat &mask, float black_point, float white_point)
Definition edge_dnn.cpp:645