Need help with multiplying mask and disparity map in C++ opencv

asked 2018-04-06 20:31:50 -0500

Kafan gravatar image

I have a mask (mat) having pixel either 0 or 255 values obtained after background substraction. Same image has been used to create a disparity matrix. Now I want to multiply this mask with disparity matrix pixelwise, so that it makes all the values in the disparity map zero, where corresponding pixel value in mask is 0 and should retain disparity value same as original disparity, where corresponding pixel value in mask is 255.

edit retag flag offensive close merge delete

Comments

Have you tried bitwise_and?

moHe gravatar imagemoHe ( 2018-04-07 00:45:23 -0500 )edit

Yes I was able to do this using bitwise_and

Kafan gravatar imageKafan ( 2018-04-08 00:27:15 -0500 )edit