Have you ever seen Harry Potter’s Invisible Cloak; Was it wonderful? Have you ever wanted to wear that cloak?
We will build the same cloak which Harry Potter uses to become invisible. Yes, we are not building it in a real way but it is all about graphics trickery. We will create our own ‘Invisibility Cloak’ using simple computer vision techniques in OpenCV.Here, we will create this magical experience using an image processing technique called Color detection and segmentation. You must have a cloth of same color and no other color should be visible into that cloth. We are taking the red cloth. If you are taking some other cloth, the code will remain the same but with minute changes.
- Capture and store the background frame
- Detect the red colored cloth using color detection and segmentation algorithm.
- Segment out the red colored cloth by generating a mask.
- Generate the final augmented output to create a magical effect.