#include <opencv2\opencv.hpp>
#include <iostream>
using namespace cv;
void callback1(int pos, void*)
{
std::cout << "hmin" << pos << std::endl;
}
void callback2(int pos, void*)
{
std::cout << "smin" << pos << std::endl;
}
void callback3(int pos, void*)
{
std::cout << "vmin" << pos << std::endl;
}
void callback4(int pos, void*)
{
std::cout << "hmax" << pos << std::endl;
}
void callback5(int pos, void*)
{
std::cout << "smax" << pos << std::endl;
}
void callback6(int pos, void*)
{
std::cout << "vmax" << pos << std::endl;
}
int main()
{
Mat src, hsv, dst;
int hmin = 0;
int smin = 0;
int vmin = 0;
int hmax = 255;
int smax = 255;
int vmax = 255;
src = imread("../data/baboon.jpg");
imshow("src", src);
cvtColor(src, hsv, CV_RGB2HSV);
opencv——inRange
最新推荐文章于 2023-07-13 09:34:09 发布