This is a simple real-time color drawing application using OpenCV and Python. With this application, you can draw in various colors using your webcam. It detects the color of an object and allows you to draw with that color on the canvas.
- ChromaDraw - Color Drawing Application
An interactive drawing application that lets you paint in the air using colored objects detected by your webcam. Simply move a colored object (like a marker cap) in front of your camera to start drawing!
Real-time color detection and tracking Multiple color options (Blue, Green, Red, Yellow) Clear canvas functionality Adjustable color detection parameters Real-time preview of tracking and drawing
- Python 3.6 or higher
- OpenCV (cv2)
- NumPy
- Clone this repository or download the source code.
- Install the required packages using pip:
pip install opencv-python numpy
- Run the application:
python main.py
-
The application will open two windows:
- Tracking: Shows your webcam feed with color tracking
- Paint: Shows your drawing canvas
-
Color Selection:
- Move the colored object to the top section of the Tracking window
- Click on the colored buttons to select different colors:
- BLUE - First color button
- GREEN - Second color button
- RED - Third color button
- YELLOW - Fourth color button
- CLEAR ALL - Clear the canvas
-
Adjusting Color Detection:
- Use the "Color detectors" window to adjust the HSV values for better color tracking
- Upper/Lower Hue: Adjust the color range
- Upper/Lower Saturation: Adjust the color intensity
- Upper/Lower Value: Adjust the brightness
- Use a brightly colored object (like a marker cap)
- Ensure good lighting in your environment
- Adjust the HSV values if the tracking isn't accurate
- Keep your hand steady while drawing for smoother lines
- Press 'q' on your keyboard or close the windows to exit
- The application works best with solid, bright colors
- Performance may vary based on your webcam quality and lighting conditions