mirror of
https://github.com/NanjingForestryUniversity/uppermachine-candy.git
synced 2025-11-08 14:24:15 +00:00
28 lines
511 B
C++
28 lines
511 B
C++
#ifndef CORRECT_H
|
|
#define CORRECT_H
|
|
|
|
#include "opencv2/opencv.hpp"
|
|
#include <QDebug>
|
|
|
|
class Correct
|
|
{
|
|
private:
|
|
float correction_ratio;
|
|
float r;
|
|
float g;
|
|
float b;
|
|
float correction_ratio_r;
|
|
float correction_ratio_g;
|
|
float correction_ratio_b;
|
|
int b_base = 125.0f;
|
|
int g_base = 125.0f;
|
|
int r_base = 125.0f;
|
|
public:
|
|
Correct();
|
|
bool is_corrected;
|
|
void get_rgb(cv::Mat img);
|
|
void cal_correction_ratio();
|
|
void correct_img(cv::Mat img);
|
|
};
|
|
#endif // CORRECT_H
|