Skip to content

MuhammadMoiz20/CamPaint

Repository files navigation

CamPaint: Webcam-Powered Painting with Color Tracking

Build Coverage License

CamPaint turns your webcam into a paintbrush. Pick a color from the live feed and "paint" by moving that color in front of the camera. It showcases real-time region detection, simple computer vision, and a playful UI.

Features

  • Real-time color tracking and region growing
  • Three display modes: webcam (w), recolored regions (r), painting (p)
  • Save painting and recolored output (s, o)
  • Clean, testable Java implementation with Maven, JUnit, and JaCoCo
  • CI via GitHub Actions, Dockerized build/run

Quick Start

Prerequisites

  • Java 17+
  • Maven 3.9+ (for local build) or Docker

Build and Test

mvn -B -DskipTests=false test

Run (stubbed UI)

This repo includes a minimal VideoGUI stub to compile and run without the course framework. Replace with your own webcam/GUI for a full experience.

mvn -q -DskipTests package
java -cp target/campaint-1.0.0.jar com.moiz.campaint.CamPaint

Docker

docker build -t campaint:1.0.0 .
docker run --rm campaint:1.0.0

Usage

  • w: show live webcam (stub shows internal buffer)
  • r: recolor detected regions
  • p: paint using the largest detected region as a brush
  • c: clear painting
  • s: save painting to pictures/painting.png
  • o: save recolored image to pictures/recolored.png

Screenshots:

Recolored Painting Demo

Project Structure

src/
  main/java/com/moiz/campaint/  # app sources
  test/java/com/moiz/campaint/  # unit tests
docs/                           # docs and images
.github/workflows/              # CI workflows

Development

  • Lint/format: use default IDE formatting; .editorconfig included
  • Tests: JUnit 5; coverage: JaCoCo (target/site/jacoco/index.html)

Contributing

Please see CONTRIBUTING.md and CODE_OF_CONDUCT.md.

License

MIT. See LICENSE.

Changelog

We follow semantic versioning. See CHANGELOG.md.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors