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

Subract one mat from another if a condition is met

$
0
0
I have 2 matrices of the same size. One of which has a "black area" where all the values are Scalar(0,0,0). I want to subtract the other matrix from this one but only in places where it isn't black (I want to leave the black alone). Id prefer not to iterate over the entire matrix if possible. I believe this is done using a mask but I am unclear how to set that up. Thanks In Advance

Viewing all articles
Browse latest Browse all 41027

Trending Articles



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