Invisibility Cloak using openCV
Soumik Sarkhel
Kolkata, West Bengal
- 0 Collaborators
Invisibility Cloak using openCV and python with image segmentation. ...learn more
Project status: Under Development
Intel Technologies
Intel Python
Overview / Usage
The project is based on computer vision. Specifically this is built with openCV.
By segmenting a single predefined color from a video footage and replacing it with a preexisting same background, we can create the immersion of invisibility cloak. Like the one used in Harry Potter.
Methodology / Approach
-
First a color to be segmented out is chosen.
-
The background without the subject(that is to become seemingly invisible) is captured.
-
The color space of the feed of the camera is converted from BGR to HSV
-
The video footage is segmented to create masks with upper and lower threshold values of the color to be segmented.
-
The segmentation process is done via creating masks with a range of Hue Saturation and Brightness value of the segmentation color.
-
The segmented mask is refined for better performance via morphologyEx of openCV.
-
Another inverted mask is generated from the above mask by performing bitwise not operation.
-
Bitwise and operation is performed on the background and the mask to get resultant mask 1.
-
Similarly bitwise and operation is performed on the video feed images and the inverted mask to get resultant mask 2
-
Both the resultant masks are added via Linear Blend, i,e, the addWeighted method of openCV
-
Finally the output of the blend is displayed.
Technologies Used
openCV
python
intel RealSense