Quantcast
Channel: OpenCV Q&A Forum - Latest question feed
Viewing all articles
Browse latest Browse all 19555

min and max values hsv in an image

$
0
0
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 #include #include using namespace cv; int main(void) { vector 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; }

Viewing all articles
Browse latest Browse all 19555

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>