Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How can I divide two matrix with mask?

I am trying to wipe off the background of a picture and I am trying to use the division method. However, in my picture, some parts of the object reflect light which has higher intensity of the background. The algorithm is result=255*(1-picture/background). I want to conduct division when the intensity of the pixel of the picture is lower than that of the background, while other pixels will be convert into 0. I want to do this with a mask, is there any ready-made function in opencv that can conduct division with a mask?

How can I divide two matrix matrixes with mask?

I am trying to wipe off the background of a picture and I am trying to use the division method. However, in my picture, some parts of the object reflect light which has higher intensity of the background. The algorithm is result=255*(1-picture/background). I want to conduct division when the intensity of the pixel of the picture is lower than that of the background, while other pixels will be convert into 0. I want to do this with a mask, is there any ready-made function in opencv that can conduct division with a mask?