twain3/ImageProcess/ImageApplyUVMerge.h

33 lines
1.1 KiB
C
Raw Normal View History

/*
* ====================================================
* ¹¦ÄÜ£ºUVͼÓëԭͼºÏ²¢¡£¸ù¾Ýԭͼ¾ÀÆ«¡¢²Ã¼ôÒÔ¼°ÐýתÇé¿ö£¬UV¸´ÖÆԭͼµÄ´¦Àí£¬²¢ÇÒÓëԭͼƴ½ÓΪһÕÅͼ¡£
¸Ã¹¦ÄÜÓÃÓÚUVÒ»Ìå»úÖС£
* ×÷ÕߣºÁõ¡Î¬
* Éú³Éʱ¼ä£º2020/7/20
* ×î½üÐÞ¸Äʱ¼ä£º2020/7/20
* °æ±¾ºÅ£ºv1.0 2020/7/20
* ====================================================
*/
#ifndef IMAGE_APPLY_UV_MERGE_H
#define IMAGE_APPLY_UV_MERGE_H
#include "ImageApply.h"
class CImageApplyUVMerge
{
public:
CImageApplyUVMerge();
~CImageApplyUVMerge();
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<int, cv::Scalar> map_color, int dpi, int threshold);
cv::Scalar getColor(const cv::Mat& image, int col, int threshold);
void update_lutData(int contrast);
cv::Mat lut;
};
#endif // !IMAGE_APPLY_UV_MERGE_H