Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/arslanex/doctor-strange-filter
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.
https://github.com/arslanex/doctor-strange-filter
instagram-filter mediapipe mediapipe-hands opencv opencv-python python
Last synced: 13 days ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/arslanex/doctor-strange-filter
- Owner: Arslanex
- License: mit
- Created: 2022-05-06T15:32:51.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-27T19:45:19.000Z (about 2 months ago)
- Last Synced: 2024-10-28T00:07:31.956Z (about 2 months ago)
- Topics: instagram-filter, mediapipe, mediapipe-hands, opencv, opencv-python, python
- Language: Python
- Homepage:
- Size: 1.59 MB
- Stars: 11
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![Banne](https://i.pinimg.com/originals/3f/35/90/3f3590a3809163db554425361295f121.jpg)
# 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)
https://github.com/Arslanex/Doctor-Strange-Filter/assets/44752389/c2e8a8bb-c874-4dd5-8721-8ce3ca51d8b8
***
Enes ARSLAN