Mask Images
Learn to mask images in OpenCV.
We'll cover the following...
We can use the bitwise operators to mask images. Masking is another essential tool to edit images in OpenCV. In this lesson, we’ll follow the steps below.
First, we’ll create a blank image.
To create a blank image, we use the np.zeros()
function of the OpenCV library.
blank = np.zeros(img.shape[:2], dtype='uint8')
What is masking?
Masking is an image editing technique used to ...