tiavec88
tiavec88

Reputation: 345

Double Thresholding with opencv

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!

Upvotes: 3

Views: 3651

Answers (1)

flowfree
flowfree

Reputation: 16462

You can use inRange:

cv::inRange(src, cv::Scalar(100), cv::Scalar(176), dst);

Upvotes: 11

Related Questions