Skip to content
← Projects

Real-time Colour Recognition

HSV-based colour detection on live camera video

A desktop application that captures live video and performs colour analysis.

Overview

A computer vision application that detects, marks and classifies colours in camera video in real time. Built with Python and OpenCV.

The Need

Colour-based object detection is a building block for many applications, including quality control, sorting and interactive systems. Colour perception, however, is highly sensitive to lighting: the same object produces entirely different pixel values under different illumination. The goal was a system that delivers consistent results under changing conditions and can be calibrated quickly on site.

The Solution

Every frame passes through a five-stage image processing pipeline:

  1. Pre-processing — Gaussian blur reduces sensor noise.
  2. Colour space conversion — The image is converted from RGB to HSV. Separating hue from brightness provides marked robustness to lighting changes.
  3. Masking — Binary masks are created from defined HSV ranges for each target colour; for colours such as red, which wrap around both ends of the hue circle, ranges are combined.
  4. Morphological refinement and contour analysis — Opening and closing operations remove noise, contours are extracted and regions below a size threshold are discarded.
  5. Visualisation — Each detected object is framed with its colour label, and the dominant colour at the centre of the image is reported separately.

On-site Calibration

Anticipating that fixed thresholds would not hold in every environment, a calibration interface was built to adjust HSV bounds live on the camera image. The system can be reconfigured for a new environment within seconds.

Impact

  • A lightweight, explainable detection pipeline that is robust to lighting changes.
  • Processing steps optimised with frame rate in mind for real-time performance.
  • A solid foundation for subsequent machine learning and computer vision work.
Python Artificial Intelligence Desktop

More projects

Sardur Engineering

Corporate website, admin panel and client portal

2025

A three-part full-stack web application for an industrial chimney-cleaning company: a public corporate site, an admin panel and a client portal.

Laravel Filament v4 MySQL +4
View project

Clinical Psychologist Website

Corporate website, content management and search visibility

2026

A corporate website designed and built from scratch, without templates, for a clinical psychologist in Denizli — trustworthy, visible in search and easy to manage.

Laravel Filament v5 Tailwind CSS +3
View project