Question

I'm writing code using visual c++ with opencv libraries. Can I do a double threshold on a grey image (like a band pass)? For example I want to set at MaxValue all the level between 100 and 176 and at Zero all the remaining values. Is it possible with opencv? Thanks in advance!

Was it helpful?

Solution

You can use inRange:

cv::inRange(src, cv::Scalar(100), cv::Scalar(176), dst);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top