Coder Social home page Coder Social logo

aayushi-mittal / invisible-cloak Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 5 KB

πŸ§™β€β™‚οΈ Harry Potter's invisible cloak using Python3 and OpenCV.

Home Page: https://youtu.be/EGMHG0bv-CE

Python 100.00%
opencv python invisible-cloak

invisible-cloak's Introduction

Invisible-Cloak

It’s the cloak which Harry Potter uses to become invisible. Of course, we all know that an invisibility cloak is not real β€” it’s all graphics trickery.

Well, it turns out that you can create this magical experience using an image processing technique called color detection and segmentation. And the good news is, you don’t need to be part of Hogwarts for that! All you need is a red colored cloth.

Click here for Video Demo

Requirements

  • python 3
  • opencv library
  • numpy library
  • Red cloth (which will serve as a cloak)

Installation of libraries (can be skipped if done)

  • Installation of Open CV and numpy

pip install opencv-python

Code

The basic idea is given below:

  1. Capture and store the background frame.
  2. Detect the red colored cloth using color detection algorithm.
  3. Segment out the red colored cloth by generating a mask.
  4. Generate the final augmented output to create the magical effect.
  • background.py It is used for extracting the static background frame. We will replace the current frame pixels corresponding to the cloth with the background pixels to generate the effect of an invisibility cloak. For this we need to store the frame of a static background.

  • invisible_cloak.py Invisible_cloak file records the main window and works with the image saved by background.py for making the invisible cloak.

Reference Links

invisible-cloak's People

Contributors

aayushi-mittal avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.