8000 GitHub - damarre89/PySkinDetection: Skin detection using HSV & YCbCr colorspaces, and Watershed
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

damarre89/PySkinDetection

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Fork update

The source code has been modified to read images from a connected cam. Once the space key is pressed, the captured frame is processed and the involved steps to detect human skin are shown, by pressing any key. Esc key will quit the application. Obviously, a connected cam is required.

  • Usage of the test app: python3 app.py

Skin detection algorithm

A quick research on the internet shows that the color segmentation is widely used for skin detection (specifically using HSV and YCbCr colorspaces), mostly by its simplicity and performance. However, the skin tones, illumination, and quality is something that could drastically vary between images. For instance, Kolkur et. al (2016), and Sha et. al (2009) studied that kind of skin segmentation and discovered completely different optimal thresholds values.

I then decided to search for other methods and found this paper written by Saxen and Al-Hamadi (2014) which shows that region based gives a better output for skin detection tasks.

Here, a region growing algorithm (Watershed) and a combination of HSV and YCbCr color segmentations work together to produce the output.

How to use

This project was implemented using Python (3.7) and OpenCV (3.4.3). The class skinDetector, available inside jeanCV.py, must be imported into your project and be used as follows:

 from jeanCV import skinDetector 

 detector = skinDetector("ImageName")
 detector.find_skin()

Installing Python (and pip) & OpenCV

Linux

  1. sudo apt-get install python3 python3-pip

  2. pip3 install opencv-python

  3. Usage of the test app: python3 app.py imageName

Windows

  1. Download and install Python 3.7

  2. On cmd/Powershell:

  • python -m pip install --upgrade pip

  • pip install opencv-python

  1. Usage of the test app: python app.py imageName

Results (output)

Screenshot1 Screenshot2 Screenshot3

About

Skin detection using HSV & YCbCr colorspaces, and Watershed

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%
0