Skip to content

Gallion-labs/chroma-flow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌈 ChromaFlow

ChromaFlow is a streamlined solution for automating green screen background removal and instant photo printing. Perfect for events, parties, and photoshoots!

πŸ“Έ Concept

  1. Take a photo with a green screen
  2. Image is automatically processed
  3. Background is replaced with your chosen scene
  4. Print the result instantly!

✨ Features

  • 🎯 Automatic Processing: Smart detection and removal of green screens
  • πŸ–ΌοΈ Custom Backgrounds: Library of scenes to replace the green screen
  • ⚑ Real-time: On-the-fly processing of new photos
  • πŸ–¨οΈ Direct Printing: Automatic sending to configured printer
  • πŸ“Š Queue Management: Real-time status tracking of photos
  • 🎨 Web Interface: User-friendly control panel
  • πŸ”„ Hot Folder: Automatic detection of new photos
  • πŸ“± Responsive Design: Works on desktop and tablets

🎯 Use Cases

Perfect for:

  • πŸŽ‰ Parties and events
  • πŸ“Έ Professional photoshoots
  • 🎭 Photo booths with themed backgrounds
  • πŸŽͺ Event entertainment
  • πŸŽ“ Graduation ceremonies
  • πŸ’‘ Weddings
  • 🏒 Corporate events

πŸš€ Installation

Prerequisites

  • Node.js (v18+)
  • Python 3.10+
  • Redis
  • A configured default printer
  • A green screen and good lighting!

Quick Setup

  1. Clone the repository:
git clone https://github.com/gallionlabs/chroma-flow.git
  1. Install dependencies:
cd chroma-flow
npm install
cd ../processor
pip install -r requirements.txt
  1. Start all services:
./start.sh
  1. Access the interface: http://localhost:5173

πŸ“ Usage

Initial Setup

  1. Printer Configuration

    • Ensure your default printer is set
    • Test print quality and paper size
    • Configure printer settings in config.yml
  2. Background Scenes

    • Add your background images to data/scenes
    • Supported formats: JPG, PNG
    • Recommended resolution: 3000x2000px or higher
  3. Green Screen Setup

    • Use a non-reflective green screen
    • Ensure even lighting
    • Avoid wrinkles in the fabric
    • Keep subjects 3-6 feet from the screen

During the Event

  1. Photo Capture

    • Take photos with consistent lighting
    • Ensure subjects don't wear green
    • Maintain focus quality
  2. Processing

    • Photos in data/images_to_process are automatically detected
    • Progress visible in web interface
    • Failed processing is logged for review
  3. Printing

    • Preview before printing
    • Adjust settings if needed
    • Monitor printer status

πŸ› οΈ Configuration

Environment Variables

PORT=3000
REDIS_HOST=localhost
REDIS_PORT=6379
PRINTER_NAME=default
PROCESS_TIMEOUT=30

Printer Settings

printer:
  format: "4x6"
  dpi: 300
  color: true
  quality: "high"

πŸ“ Folder Structure

chroma-flow/
β”œβ”€β”€ frontend/          # React application
β”‚   β”œβ”€β”€ src/          # Source files
β”‚   └── public/       # Static assets
β”œβ”€β”€ api/              # Express server
β”‚   β”œβ”€β”€ src/         # API source files
β”‚   └── dist/        # Compiled files
β”œβ”€β”€ processor/        # Python image processor
β”‚   β”œβ”€β”€ src/         # Processing logic
β”‚   └── venv/        # Python virtual environment
β”œβ”€β”€ data/
β”‚   β”œβ”€β”€ images_to_process/  # Input folder
β”‚   β”œβ”€β”€ processed_images/   # Output folder
β”‚   β”œβ”€β”€ scenes/            # Background images
β”‚   └── temp/             # Temporary files
└── logs/                 # Application logs

⚠️ Troubleshooting

Common Issues

  1. Green Screen Detection

    • Check lighting uniformity
    • Verify green screen color (use RGB: 0, 255, 0)
    • Clean the screen surface
    • Adjust distance from subject
  2. Printing Problems

    • Verify printer connection
    • Clear print queue if stuck
    • Restart printer service
  3. Performance Issues

    • Monitor Redis connection
    • Check disk space
    • Verify CPU usage
    • Clean temp folders

Logs

  • Frontend: logs/frontend.log
  • API: logs/api.log
  • Processor: logs/processor.log

πŸ”§ Technical Architecture

Components

  1. Frontend (React/TypeScript)

    • Real-time updates via Socket.IO
    • Material UI components
    • State management with React Context
    • Responsive design
  2. API (Node.js/Express)

    • RESTful endpoints
    • WebSocket support
    • Queue management
    • Printer interface
  3. Processor (Python)

    • Image processing with OpenCV
    • Background removal with rembg
    • File system monitoring
    • Queue integration

Communication Flow

graph LR
    A[Camera] --> B[Hot Folder]
    B --> C[Processor]
    C --> D[Redis Queue]
    D --> E[API]
    E --> F[Frontend]
    F --> G[Printer]
Loading

🀝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

Built with:

πŸ“ž Support


Made with ❀️ to make your events more magical!

About

ChromaFlow is a streamlined solution for automating green screen background removal and instant photo printing. Perfect for events, parties, and photoshoots!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors