/*
* ====================================================
* 功能:色偏校正
* 作者:刘丁维
* 生成时间:2022/12/01
* 最近修改时间:2022/12/01
* 版本号:v1.0 2022/12/01
* v1.1 2022/12/01 增加从文件中读取查值表数据接口;增加导出查值表数据接口
* ====================================================
*/
#ifndef IMAGE_APPLY_COLOR_CAST_CORRECT_H
#define IMAGE_APPLY_COLOR_CAST_CORRECT_H
#include "ImageApply.h"
class CImageApplyColorCastCorrect : public CImageApply
{
public:
///
/// 默认使用 points_x = { 0, 80, 175, 255 } points_y = { 12, 85, 175, 270 }曲线创建查值表
///
CImageApplyColorCastCorrect();
///
/// 用户自定义查值表
///
/// HSV色彩空间H通道曲线变换节点坐标X轴
/// HSV色彩空间H通道曲线变换节点坐标Y轴
CImageApplyColorCastCorrect(const std::vector& points_x, const std::vector& points_y);
///
/// 从文件中加载现有查值表数据
///
///
CImageApplyColorCastCorrect(const std::string& fileName);
virtual ~CImageApplyColorCastCorrect(void);
virtual void apply(cv::Mat& pDib, int side);
virtual void apply(std::vector& mats, bool isTwoSide);
///
/// 导出当前查值表数据
///
///
void exportTableData(const std::string& fileName);
private:
std::vector caculate(const std::vector& points_x, const std::vector& points_y);
void createTable(const std::vector& points_x, const std::vector& points_y);
private:
uint* m_table;
};
#endif