Skip to content

Computer-Vision-Projects-Lab/simple-skin-colour-detector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Simple Skin Colour Detector (CSC4082)

This project implements a statistical skin colour detector based on the methodology described in Szeliski (2011). It was developed as part of the CSC4082 - Group Task to explore image formation and chromaticity-based segmentation.

๐Ÿ“Œ Project Objective

The primary goal is to review image formation concepts by devising a detector that can distinguish skin pixels from background pixels using color distribution modeling in the xy chromaticity space.


๐Ÿ› ๏ธ Methodology & Steps

The implementation follows the suggested steps from Szeliski Exercise 2.8:

  1. Data Acquisition: Collected a variety of photographs of people under different lighting conditions.
  2. Chromaticity Calculation: For each pixel, we calculate the $xy$ chromaticity values to decouple luminance from color: $$x = \frac{R}{R+G+B}, \quad y = \frac{G}{R+G+B}$$
  3. Training (Manual Labeling): Using a painting tool/cropping to isolate skin regions (faces, arms) to build a ground truth dataset.
  4. Distribution Modeling: - Calculated the Mean ($\mu$) and Covariance ($\Sigma$) of the skin pixels.
    • (Optional) Modeled non-skin pixels to define a background distribution.
  5. Segmentation: Applied the computed distribution to find skin regions in test images, masking non-skin pixels in white or black for visualization.

๐Ÿš€ Getting Started

Prerequisites

  • Python 3.8+
  • OpenCV
  • NumPy
  • Matplotlib

Installation

git clone https://github.com/Computer-Vision-Projects-Lab/simple-skin-colour-detectorskin-colour-detector.git
cd skin-colour-detector
pip install -r requirements.txt

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages