Virtual Painter

Real-time color marker tracking and drawing application using OpenCV and C++

C++OpenCVComputer VisionReal-time Processing
Virtual Painter

Description

The Color Marker Tracker program utilizes the OpenCV library to detect and track yellow and pink markers in a live video feed. The program performs the following steps:

Video Capture

The program accesses the video feed from a connected camera.

Color Detection

The program converts each frame of the video to the HSV color space and applies a color range to filter out yellow and pink markers. It creates binary masks for the detected colors.

Contour Detection

The program finds contours in the binary masks to identify the markers' positions. It filters out small contours based on their area and approximates the contours' shapes.

Tracking and Drawing

The program tracks the markers by determining the center point of each contour. It then draws circles around the markers using their respective colors.

Display

The program displays the video feed with the markers and circles drawn in real-time.

Continuous Update

The program continuously updates the markers' positions and redraws the circles as the markers move within the video feed.

Demo

Virtual Painter Demo 1
Virtual Painter Demo 2

Features

  • Real-time tracking and drawing with yellow and pink markers in a live video feed
  • Conversion of video frames to the HSV color space for color detection
  • Detection of contours and filtering based on contour area
  • Approximation of contour shapes to find the markers' center points
  • Drawing circles around the markers using their respective colors
  • Continuous updates of marker positions and circles in real-time

Installation

Clone the repository:

git clone https://github.com/VardanKeshishyan/ColorMarkerTracker

Navigate to the project directory:

cd ColorMarkerTracker

Compile the program using a C++ compiler and link with OpenCV libraries

Usage

Run the program, and it will access the video feed from the connected camera.

The program will detect yellow and pink markers in the live video feed.

As you move the yellow and pink markers within the camera's view, the program will track their positions and draw circles around them using their respective colors.

The drawn circles will be updated in real-time based on the markers' movements.

Enjoy the interactive drawing experience using the yellow and pink markers.

Press the 'Esc' key to exit the program.

License

This project is licensed under the MIT License.

Contribution

Contributions to the Color Marker Tracker project are welcome. Feel free to fork the repository and submit pull requests with your improvements.

If you find any issues or have suggestions for enhancements, please create an issue in the GitHub repository.