3

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!

WildCrustacean
  • 5,896
  • 2
  • 31
  • 42
tiavec88
  • 345
  • 1
  • 4
  • 12

1 Answers1

11

You can use inRange:

cv::inRange(src, cv::Scalar(100), cv::Scalar(176), dst);
flowfree
  • 16,356
  • 12
  • 52
  • 76