#include <imgproc/imgproc.hpp>
#include <opencv2/core/core.hpp>
#include<opencv2/highgui/highgui.hpp>
#include <iostream>
#include <opencv2/opencv.hpp>
#include <opencv2/highgui/highgui.hpp>
#include<string>
#include<vector>
#define BIGGEST(a,b,c) (a>b?(a>c?a:c):(b>c?b:c))
#define RED 1
#define GREEN 2
#define BLUE 3
//HSV范围
//红色HSV范围
#define iLowH_R 125
#define iHighH_R 155
#define iLowS_R 43
#define iHighS_R 255
#define iLowV_R 46
#define iHighV_R 255
//绿色HSV范围
#define iLowH_G 35
#define iHighH_G 77
#define iLowS_G 43
#define iHighS_G 255
#define iLowV_G 46
#define iHighV_G 255
//蓝色HSV范围
#define iLowH_B 100
#define iHighH_B 124
#define iLowS_B 128
#define iHighS_B 255
#define iLowV_B 102
#define iHighV_B 255
using namespace cv;
using namespace std;
Mat WhiteBalance(Mat image);
double PixelTotal(Mat mask);
int HSV(Mat img);
int main() {
IplImage* examp
opencv识别RGB三种颜色并返回结果
最新推荐文章于 2024-09-01 21:43:29 发布
本文介绍了如何利用OpenCV库在图像处理中识别RGB三种颜色,并详细阐述了颜色空间转换和颜色阈值设置的方法,帮助读者理解并实现颜色识别功能。
摘要由CSDN通过智能技术生成