Giter Club home page Giter Club logo

arslanex / doctor-strange-filter Goto Github PK

View Code? Open in Web Editor NEW
9.0 2.0 1.0 1.62 MB

Python project using OpenCV and Mediapipe to create a Dr. Strange filter. It detects hand gestures, calculates palm midpoint and openness, then overlays a mask if the hand is open. A concise demonstration of computer vision concepts like perspective and image rotation.

License: MIT License

Python 100.00%
instagram-filter mediapipe mediapipe-hands opencv opencv-python python

doctor-strange-filter's Introduction

Banne

Doctor Strange Filter with Python

This project is a test of my skills in computer vision. The project was created using Mediapipe and OpenCV libraries and Python program language. As the name suggests, I tried to replicate the magic circles that appear on the palms of the popular MARVEL hero Dr. Strange when he casts a spell.

To summarize the working logic of the project, the script starts by detecting hand gestures from your device's camera and then calculates the midpoint of your palm and the openness of your palm with these points. If your hand is open enough, a mask (the filter itself) is created using the previously given images and pasted onto the calculated midpoint.

Of course, this was a very simple explanation. There are many things to know about perspective, rotating image objects and creating transparent objects during this project. I hope this project will help you to understand these topics :)

Folder Structure

.
├── Models                    # Models to be used when creating the filter
|   ├── Inner Circles         # Circle models to be found on the inner side 
|   └── Outer Circles         # Circle models to be found on the outer side 
├── functions.py              
├── main.py                    
├── LICENSE
├── requirements.txt                   
└── README.md

Setup

  1. Clone this repostiory : git clone https://github.com/Arslanex/Instagram-Mapping
  2. Instal requirements : pip install -r requirements.txt
  3. Run main.py script : python main.py

Screenshots and Videos (will loaded)

video.mp4


Enes ARSLAN

doctor-strange-filter's People

Contributors

arslanex avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

chetanjain281

doctor-strange-filter's Issues

Other filters?

Very interesting project, thank you. But can we do a filter to make nose smaller?

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.