First time here? Check out the FAQ!
answered 2017-04-16 05:28:55 -0600
You can use operator < and setTo method :
Mat mask=density<thresold; mMask.setTo(0,mask);