资 源 简 介
This is a simple class for detecting skin in images. Each color of a pixel is transformed into the hsv-colorspace and then compared against a skin-color database.
Usage
$skindetection = new SkinDetection("images/example1.jpg", "output1.png");$skindetection->loadSkinColors("skin_colors.txt");$skindetection->setThresholdH(0.04, 0.04);$skindetection->setThresholdS(0.09, 0.09);#$skindetection->enableImageMagick();#$skindetection->enableResize(50, 10);$return = $skindetection->process();print_r($return);
Examples
Good Examples
images/example1.jpg
pixels overall: 32000pixels skin: 16775percent sk