min and max values hsv in an image
Hi, Im trying to get the value for the max for S and V inside an image. In this example, the mean of the value can be obtained, but how to get the max and min?
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <stdio.h>
using namespace cv;
int main(void)
{
vector<Mat> channels;
Mat img = imread("Documents/forest.jpg");
cvtColor(img, img, CV_BGR2HSV);
split(img, channels);
Scalar m = mean(channels[0]);
printf("%f\n", m[0]);
return 0;
}
@berak what is your opinion on deleting this. there is a post a bit more detailed http://answers.opencv.org/question/27...