Quantcast
Channel: OpenCV Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 4615

Check for metamers in an image (using C++)

$
0
0
How do I check how many metamers on my image using OpenCV & C++ ? For example in this picture, what I'm trying to do is find out that box in no 1 & 5 are metamers, also box no. 3 & 6. So total I have 2 metamers (blue & yellow), and later I need to swap the color. ![image description](/upfiles/1518786834808628.png) What I've been doing so far is using inRange, and take an example of blue color range : Blue no.1 (152,42,5) - BGR order Blue no.6 (185,50,4) - BGR order Mat mask; cv::Scalar lowerb = cv::Scalar(150,20,0); cv::Scalar upperb = cv::Scalar(200,50,5); cv::inRange(frame, lowerb, upperb, mask); In this case I can define the target range, but later this colors will always programmatically change, so the target range will also change. And this also only for one color. How do I detect several colors that perceived the same when the target range isn't fixed ?

Viewing all articles
Browse latest Browse all 4615

Trending Articles



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