code_production/code/base/correctProcess.h

35 lines
1.6 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef CORRECT_PROCESS_H
#define CORRECT_PROCESS_H
#include <opencv2/opencv.hpp>
//uchar m_byteArray[78336 * 26];
//int m_index[] = { 0, 4896 * 26 * 3, 4896 * 26 * 4, 4896 * 26 * 7, 4896 * 26 * 8, (78336 - 9796 * 4) * 26, (78336 - 9796) * 26 };
/// <summary>
/// 校正处理。灰阶校正+色偏校正。
/// </summary>
/// <param name="image">灰阶校正原图</param>
/// <param name="blackLevel">黑色等级</param>
/// <param name="colorCastEnable">色偏校正使能。true为进行色偏校正false为禁止</param>
/// <param name="referValues">色偏校正参考数据</param>
/// <param name="path">校正数据关键点文件保存路径</param>
/// <returns>[0]为灰阶校正数据;[1]为正面色偏校正数据;[2]为反面校正数据</returns>
std::vector<cv::Mat> correctProcess(cv::Mat& image, int blackLevel, bool colorCastEnable, const std::vector<uchar>& referValues, int dpi, const std::string& path);
/// <summary>
/// 校正处理。灰阶校正+色偏校正。
/// </summary>
/// <param name="image1">灰阶校正原图(正)</param>
/// <param name="image2">灰阶校正原图(反)</param>
/// <param name="blackLevel">黑色等级</param>
/// <param name="colorCastEnable">色偏校正使能。true为进行色偏校正false为禁止</param>
/// <param name="referValues">色偏校正参考数据</param>
/// <param name="path">校正数据关键点文件保存路径</param>
/// <returns>[0]为灰阶校正数据;[1]为正面色偏校正数据;[2]为反面校正数据</returns>
std::vector<cv::Mat> correctProcess(cv::Mat& image1, cv::Mat& image2, int blackLevel, bool colorCastEnable, const std::vector<uchar>& referValues, int dpi, const std::string& path);
void correctLUT(cv::Mat& image, const cv::Mat& lut);
cv::Mat readZipCorrect(uchar* data, int len, int blackLevel);
#endif