- We are given a dataset, in that data set for every image consists set of two images respectively. One is mask_image, and the other is rgb_image. Our task is to get the ouput of the image by masking the rgb and mask image respectively.
- Libraries:
- numpy
- cv2
- matplotlib
- First download the dataset using the given drive link and unzip the files using the command given below.
!unzip filepathname
-
First we need to fetch the image from the file location
-
After fetching the images, we need to do some data preprocessiong of the given dataset. The code is written inside the "".ipynb" file.
-
Now we can start using the different bitwise operator to merge these two images properly. Since Bitwise and was working sucessfully, so I have use that command to implement.
cv2.bitwise_and(img_path, img_path, mask = mask)
- After performing the above operation you will get the output as shown below:
- For reference I have attached my pyhton file you can refer that.