code_device/hgdriver/ImageProcess/ImageApplyColorCastCorrect.h

89 lines
2.8 KiB
C
Raw Normal View History

/*
2023-02-24 10:07:24 +00:00
* ====================================================
*
*
* 2022/12/01
* v1.0 2022/12/01
* v1.1 2022/12/01
* v1.1.1 2023/03/24
* v1.2 2023/04/04 线CIS_DN_PATCH3
* v1.3 2023/04/17
* v2.0 2023/05/15
* v2.1 2023/10/07
* v2.2 2023/11/13
* v2.2.1 2023/11/13
* v2.2.2 2023/11/17
* v2.2.3 2023/11/17
* v2.2.3
2023-02-24 10:07:24 +00:00
* ====================================================
*/
#ifndef IMAGE_APPLY_COLOR_CAST_CORRECT_H
#define IMAGE_APPLY_COLOR_CAST_CORRECT_H
#include "ImageApply.h"
class GIMGPROC_LIBRARY_API CImageApplyColorCastCorrect : public CImageApply
{
public:
//预设方案
enum PreScheme
{
G200,
G300,
G300_D8,
2023-11-16 06:33:41 +00:00
G300_7010,
G400_402,
G400_3288,
Android302
};
CImageApplyColorCastCorrect(PreScheme ps = G200);
CImageApplyColorCastCorrect(const std::vector<double>& h_x, const std::vector<double>& h_y,
const std::vector<double>& l_x, const std::vector<double>& l_y,
const std::vector<double>& s_x, const std::vector<double>& s_y);
2023-02-24 10:07:24 +00:00
/// <summary>
/// 用户自定义查值表
2023-02-24 10:07:24 +00:00
/// </summary>
/// <param name="points_x">HSV色彩空间H通道曲线变换节点坐标X轴</param>
/// <param name="points_y">HSV色彩空间H通道曲线变换节点坐标Y轴</param>
2023-02-24 10:07:24 +00:00
CImageApplyColorCastCorrect(const std::vector<double>& points_x, const std::vector<double>& points_y);
/// <summary>
/// 从文件中加载现有查值表数据
2023-02-24 10:07:24 +00:00
/// </summary>
/// <param name="fileName"></param>
CImageApplyColorCastCorrect(const std::string& fileName);
/// <summary>
/// 针对HSV中H通道的LUT校正数据
/// </summary>
/// <param name="table_h"></param>
CImageApplyColorCastCorrect(const uchar* table_h);
2023-02-24 10:07:24 +00:00
virtual ~CImageApplyColorCastCorrect(void);
virtual void apply(cv::Mat& pDib, int side);
virtual void apply(std::vector<cv::Mat>& mats, bool isTwoSide);
/// <summary>
/// 导出当前查值表数据
2023-02-24 10:07:24 +00:00
/// </summary>
/// <param name="fileName"></param>
void exportTableData(const std::string& fileName);
private:
void createTable_h(const std::vector<double>& points_x, const std::vector<double>& points_y);
void createTable_l(const std::vector<double>& points_x, const std::vector<double>& points_y);
void createTable_s(const std::vector<double>& points_x, const std::vector<double>& points_y);
2023-02-24 10:07:24 +00:00
private:
uchar* m_table_h, *m_table_l, *m_table_s;
2023-02-24 10:07:24 +00:00
};
#endif