Skip to main content

Real-time webcam to ASCII art converter for terminal

Project description

ASCII Camera ๐Ÿ“นโœจ

โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
โ•‘            ๐ŸŽฅ ASCII CAMERA ๐Ÿ“น           ใ€€โ•‘
โ•‘        Real-time Retro Video Art         โ•‘
โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

Transform your webcam feed into retro ASCII art in real-time! ASCII Camera brings back the nostalgic charm of text-based graphics while showcasing your creativity in the terminal.

Features

๐ŸŽฅ Real-time conversion: Live webcam feed to ASCII art
๐ŸŒˆ Colorful output: Support for colored ASCII art with ANSI escape codes
โšก High performance: Optimized for smooth real-time rendering
๐ŸŽ›๏ธ Customizable: Multiple ASCII character sets and color schemes
๐Ÿ“ Adaptive resolution: Automatically adjusts to your terminal size
๐Ÿ”ง Easy to use: Simple command-line interface

Installation

From PyPI (recommended)

pip install ascii-camera

From source

git clone https://github.com/masashimorita/ascii_camera.git
cd ascii_camera
pip install -e .

Usage

Basic usage

ascii-camera

With custom options

# High detail ASCII characters
ascii-camera --charset detailed

# Colored output
ascii-camera --color

# Custom resolution
ascii-camera --width 80 --height 24

# Different FPS
ascii-camera --fps 15

# Retro green terminal theme
ascii-camera --color --theme matrix

Available options

  • --width, -w: Terminal width (default: auto-detect)
  • --height, -h: Terminal height (default: auto-detect)
  • --fps: Frames per second (default: 12)
  • --charset: ASCII character set (simple/detailed/block)
  • --color: Enable colored output
  • --theme: Color theme (matrix/amber/cyan/rainbow)
  • --camera: Camera device index (default: 0)
  • --help: Show help message

ASCII Character Sets

  • Simple: .:-=+*#%@ (10 levels)
  • Detailed: .,'~!;<>+*xvXGM#8@ (16 levels)
  • Block: โ–‘โ–’โ–“โ–ˆ (4 levels, bold look)

Color Themes

  • Matrix: Classic green-on-black terminal
  • Amber: Retro amber terminal
  • Cyan: Cool cyan blue
  • Rainbow: Dynamic color mapping

Requirements

  • Python 3.8+
  • OpenCV (opencv-python)
  • NumPy
  • Colorama (for Windows color support)
  • Webcam/camera device

How it works

  1. Capture: Uses OpenCV to grab frames from your webcam
  2. Process: Converts each frame to grayscale and resizes to terminal dimensions
  3. Map: Maps pixel brightness values to ASCII characters
  4. Display: Renders the ASCII frame in your terminal with optional colors
  5. Repeat: Continues the process for real-time video

Troubleshooting

Camera not found

# Try different camera indices
ascii-camera --camera 1
ascii-camera --camera 2

Performance issues

# Lower FPS for better performance
ascii-camera --fps 8

# Smaller resolution
ascii-camera --width 60 --height 20

Terminal compatibility

  • Works best with modern terminals that support ANSI escape codes
  • For Windows: Use Windows Terminal, ConEmu, or enable ANSI support

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License - see LICENSE file for details.

Inspiration

Inspired by classic ASCII art and retro terminal aesthetics. Perfect for developers who love the intersection of modern technology and nostalgic computing.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ascii_camera-0.1.0.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ascii_camera-0.1.0-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file ascii_camera-0.1.0.tar.gz.

File metadata

  • Download URL: ascii_camera-0.1.0.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.12

File hashes

Hashes for ascii_camera-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e462f98d403d80f04e812a05e5701117f2cb682459df4c5b9d692d3b8d53686b
MD5 538e90b490e8755d1b881045cb9e9639
BLAKE2b-256 3628f573353d108720f6092de0f32b977a278ebd319add56283d82c3fe9f4f3b

See more details on using hashes here.

File details

Details for the file ascii_camera-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ascii_camera-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.12

File hashes

Hashes for ascii_camera-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1eb1cda765732a01a67edc9cb7c7f92bd5ae761426390815c1e00d293070fa89
MD5 13608855497401f2e0b160b78ca35afa
BLAKE2b-256 1597ce49a6c358004382ad4110e97a3d88da8a556d57d6e2aaf8ce7b5d9ac5e2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page