|
|
|
@ -1,7 +1,7 @@
|
|
|
|
#include <vector>
|
|
|
|
#include <vector>
|
|
|
|
#include <iostream>
|
|
|
|
#include <iostream>
|
|
|
|
#include <exception>
|
|
|
|
#include <exception>
|
|
|
|
#include <opencv/cv.h>
|
|
|
|
#include <opencv2/opencv.hpp>
|
|
|
|
#include <opencv2/imgcodecs.hpp>
|
|
|
|
#include <opencv2/imgcodecs.hpp>
|
|
|
|
#include <opencv2/imgproc.hpp>
|
|
|
|
#include <opencv2/imgproc.hpp>
|
|
|
|
#include <opencv2/videoio.hpp>
|
|
|
|
#include <opencv2/videoio.hpp>
|
|
|
|
@ -22,7 +22,7 @@ using namespace cv;
|
|
|
|
void detect_brightness(cv::Mat input_img, float& cast, float& da)
|
|
|
|
void detect_brightness(cv::Mat input_img, float& cast, float& da)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
cv::Mat gray_img;
|
|
|
|
cv::Mat gray_img;
|
|
|
|
cv::cvtColor(input_img, gray_img, CV_BGR2GRAY);
|
|
|
|
cv::cvtColor(input_img, gray_img, COLOR_BGR2GRAY);
|
|
|
|
|
|
|
|
|
|
|
|
float a = 0, Ma = 0;
|
|
|
|
float a = 0, Ma = 0;
|
|
|
|
int hist[256] = { 0 };
|
|
|
|
int hist[256] = { 0 };
|
|
|
|
|