How do I threshold between two values a and b ?
Sure I can create two thresholded Mat, one for each bound a and b, and multiply them component-wise, but how do I do that ?
Sure I can create two thresholded Mat, one for each bound a and b, and multiply them component-wise, but how do I do that ?
Given the Matrix M, I threshold it (binary) with threshold value a, the ouput is A. Then I threshold M again (binry inverted) with value b, the output is B. Then if I multiply A and B component wise (Hadamard product) I should get what I want.
But I found the "inrange" function which does that automatically.
Asked: 2014-11-07 19:56:32 -0600
Seen: 1,029 times
Last updated: Nov 07 '14
Can you express your idea in a mathematical equation? (Just ignore for a moment about how to get it working in OpenCV.)
^^ so, can we call it 'solved' ?