zynq_7010/zynq_7010_code/correct_ultis.h

39 lines
1.1 KiB
C
Raw Normal View History

2023-07-17 03:29:37 +00:00
#pragma once
#include <sstream>
2023-07-20 03:48:38 +00:00
#include <opencv2/opencv.hpp>
2023-07-17 03:29:37 +00:00
#include "CameraParam.h"
#include "CorrectParam.h"
#include "CImageMerge.h"
2023-07-20 03:48:38 +00:00
static cv::Mat lutGrayMat; //灰色校正值
static cv::Mat lutColorMat; //彩色校正值
2023-07-17 03:29:37 +00:00
static CorrectParam correctparam;
void initStep();
void setOffset(int *config, int step);
2023-08-15 01:50:06 +00:00
cv::Mat calcLUT(const cv::Mat& black, const cv::Mat& white, bool isTextCorrection);
2023-07-17 03:29:37 +00:00
2023-08-31 08:37:05 +00:00
void calcLUT(int dpi , int mode, bool isTextCorrection, cv::Mat& lut);
2023-08-15 01:50:06 +00:00
cv::Mat extractRepresentRow2(const cv::Mat& src);
2023-07-17 03:29:37 +00:00
void initLut(const std::string lutpath,bool iscolor);
2023-07-20 03:48:38 +00:00
void correctColor(cv::Mat& src, int dpi,int mode,bool isTextCorrect=true);
2023-07-17 03:29:37 +00:00
2023-08-31 08:37:05 +00:00
void correctColor(cv::Mat& src, cv::Mat& lut);
2023-07-17 03:29:37 +00:00
void creatLUTData(int dpi , int mode);
2023-08-31 08:37:05 +00:00
cv::Mat creatLUTData_7010(int dpi , int mode);
2023-07-17 03:29:37 +00:00
FPGAConfigParam GetFpgaparam(int dpi,int mode);
void SaveFpgaparam(FPGAConfigParam& param);
2023-08-15 01:50:06 +00:00
cv::Mat create_lut(const cv::Mat& black, const cv::Mat& white,int dpi, bool colormode);
2023-07-17 03:29:37 +00:00
2023-08-15 01:50:06 +00:00
cv::Mat GetMergeMat(int dstwidth ,int dstheight,int type,cv::Mat& mat);