Posts

Showing posts with the label image-segmentation

Invisible Cloak using OpenCV

Image
Have you ever seen Harry Potter’s   Invisible Cloak   If not then let's have a look.     Was it wonderful? Do you surprised how this can be possible? If yes, then this post is going to help you. You will be able to make such invisible cloak by your own but yes, not in real way but it is all about graphics . Algorithm behind the idea First, we take the background frame ( for some second ) and store in the memory. Then, we will take the frame with cloth. Then, detect and segment the portion of the cloth of pre-determined color. For Example here we will use Red. [ known as Color Detection and Image Segmentation ] Then, that segment will be replaced by the background , we have stored in the memory, segment. At last, create the final image to make the magic. Note: All the things will be done in python due to the availability of the various libraries mainly numpy . Python Code: First of all, importing all the required librar...