I am new to image processing and I am interested how image masking can be used to extract a portion of a image.
Have a look at this OpenCV tutorial.
In the section Application of Mask, they say that you can use a white mask over the area of the image you want to extract.
So I am interested in how this math works. Correct me if I am wrong but if I take the minimum of the pixel from the original pixel and the mask I should get the portion of the portion of the image I want to extract.
This works because the area that I want to extract is covered by the white area of the mask, ie covered by pixels with 255 in all channels, so
will always give me the pixel value,
while on the other hand the portions I don't want are covered by black pixels(intensity value of 0), so
will always give me 0 thus I will exclude these sections from my filter.
This my intuition correct ? Is this how image masking works in order to extract the image ?