#pragma once #include #include "ImageProcess/ImageProcess_Public.h" #include class ImageApplyUV { public: ImageApplyUV(); ~ImageApplyUV(); void Apply(cv::Mat& image, const cv::Mat& uv, int dpi = 200, int thresh = 100); static cv::Mat Apply(const cv::Mat& image, const cv::Mat& uv, const cv::RotatedRect& uvRoi, bool isDesaskew, int angle); private: void purgeQR_kernal(cv::Mat& image, const cv::Rect& roi, std::map map_color, int dpi, int threshold); void findContours1(const cv::Mat& src, std::vector>& contours, std::vector& hierarchy, int retr = cv::RETR_LIST, int method = cv::CHAIN_APPROX_SIMPLE, cv::Point offset = cv::Point(0, 0)); cv::Scalar getColor(const cv::Mat& image, int col, int threshold); void update_lutData(int contrast); cv::Mat lut; };