Invisible Cloak

To make Harry Potter’s Invisibility Cloak, we are using OpenCV Python.

OpenCV-Python is a library of Python bindings designed to solve computer vision problems. OpenCV-Python makes use of Numpy, which is a highly optimized library for numerical operations. All the OpenCV array structures are converted to and from Numpy arrays.

Here, we will create this magical experience using an image processing technique called Color detection and segmentation.

Instructions:

Step 1: pip install opencv-python

Step 2: Run Invisible cloak.py

Step 3: Give it a second to take a snapshot of the background

Step 4: Use a plain red cloth as a cloak

Enjoy the magic!

Note: if you like to use a different color cloth to make invisible then you will need to set the Hue Saturation Value (HSV) accordingly.