ascii_webcam
Show your webcam as ASCII art
- Commits
- 9
- Files
- 7
- Size
- 14.1 KB
- Langs
- 1
- Stars
- 5
- Created
- Sep 3, 2024
- Last push
- about 2 years ago
ASCII Webcam Art
This repository contains a collection of Python scripts that transform your webcam feed into various forms of ASCII art. Each script offers a unique take on rendering your camera input as text-based visual art, with OpenCV used for positioning the "camera" on the face and displaying eyes in with special characters.
Scripts Overview
https://github.com/user-attachments/assets/a4847154-f4da-4df3-a484-d491e3d128b3
1. ascii_webcam_eyes.py
This script focuses on detecting and displaying eyes as emojis in an ASCII canvas.
Key features:
- Uses OpenCV for face and eye detection
- Displays detected eyes as eye emojis (👁️)
- Maintains a consistent 15 FPS for smooth performance
- Mirrors the webcam input for a more intuitive experience
2. ascii_yolo_webcam.py
https://github.com/user-attachments/assets/ed7acaf2-a416-428b-a168-d4d5b66b78af
This script provides a more detailed ASCII representation of the entire face, with special emphasis on eyes.
Key features:
- Uses YOLO (You Only Look Once) for face detection
- Employs OpenCV for eye detection within the face region
- Renders the face in ASCII characters with contrast and dithering options
- Highlights detected eyes in red
- Displays performance metrics and detection information
3. glitch_braille_cam.py
This script creates an artistic, glitch-like effect using Braille characters.
Key features:
- Renders the webcam feed using Braille characters
- Implements a datamoshing-like effect by blending frames
- Introduces random glitches for an artistic touch
- Provides a unique, abstract representation of the video feed
Key Differences
-
Detection Methods:
ascii_webcam_eyes.pyuses simple OpenCV detectionascii_yolo_webcam.pycombines YOLO and OpenCV for more robust detectionglitch_braille_cam.pydoesn't use specific feature detection
-
Rendering Style:
ascii_webcam_eyes.pyfocuses solely on rendering eyesascii_yolo_webcam.pyrenders the entire face in ASCII with eye highlightsglitch_braille_cam.pyuses Braille characters for a more abstract representation
-
Performance:
ascii_webcam_eyes.pyis optimized for performance, maintaining 15 FPSascii_yolo_webcam.pyis more computationally intensive due to YOLO and detailed renderingglitch_braille_cam.pybalances between artistic effect and performance
-
Artistic Approach:
ascii_webcam_eyes.pyis minimalistic, focusing on eye representationascii_yolo_webcam.pyaims for a more complete and detailed ASCII portraitglitch_braille_cam.pytakes an abstract, glitch-art approach
Usage
To run any of the scripts, ensure you have the required dependencies installed, then execute the script using Python:
python script_name.py
Press 'q' to exit the program.
Enjoy exploring these different approaches to ASCII webcam art!