rgb 中的肤色范围是多少?
What is skin colour range in rgb?
我已经看到几个关于肤色的问题,但没有在 rgba 中找到确切的肤色范围。有人可以告诉欧洲中年男人什么是最小-最大 rgba 颜色吗?
我的代码是这样的:
//Here should be scin min max rgba range
static CvScalar min = cvScalar(0, 0, 130, 0);//BGR-A
static CvScalar max= cvScalar(140, 110, 255, 0);//BGR-A
public static void main(String[] args) {
//read image
IplImage orgImg = cvLoadImage("colordetectimage.jpg");
//create binary image of original size
IplImage imgThreshold = cvCreateImage(cvGetSize(orgImg), 8, 1);
//apply thresholding
cvInRangeS(orgImg, min, max, imgThreshold);
//smooth filter- median
cvSmooth(imgThreshold, imgThreshold, CV_MEDIAN, 13);
//save
cvSaveImage("threshold.jpg", imgThreshold); }
所以我只需要在这里指定 rgba 值。
对此没有真正的答案。肤色变化很大(即使对于中年白人男性也是如此),然后当你加入灯光效果(过度曝光、曝光不足、低光、彩色入射光)时,你无法区分皮肤和非皮肤 仅像素的RGB值。
我的建议是选择一个合理的第一近似值,然后调整参数。并且不要 期望 能够在不考虑上下文的情况下准确地检测皮肤...不知何故。
您可以通过查看从谷歌搜索 "skin tone color chart rgb" 获得的其中一张彩色图表来进行初步近似。随你挑...
@Stephen C what do u mean by "pick sensible first approximation, and then tweak the parameters" ? Just picking 1 color from a palette and what then?
(忽略光效问题。)由于 RGB 中的颜色定义了 3-D space,我建议在 space 中有一个区域颜色为 "skin" 音调。问题是要获得该区域的合理近似值,您可以从 "skin" 色调的颜色图表开始,将它们绘制成 3-D 并找出一个简单的 3-D 外壳来包围它们......并且不会不要包含您眼中不合适的颜色。然后根据船体尝试您的 "skin detection" 并相应地进行调整。
我已经看到几个关于肤色的问题,但没有在 rgba 中找到确切的肤色范围。有人可以告诉欧洲中年男人什么是最小-最大 rgba 颜色吗?
我的代码是这样的:
//Here should be scin min max rgba range
static CvScalar min = cvScalar(0, 0, 130, 0);//BGR-A
static CvScalar max= cvScalar(140, 110, 255, 0);//BGR-A
public static void main(String[] args) {
//read image
IplImage orgImg = cvLoadImage("colordetectimage.jpg");
//create binary image of original size
IplImage imgThreshold = cvCreateImage(cvGetSize(orgImg), 8, 1);
//apply thresholding
cvInRangeS(orgImg, min, max, imgThreshold);
//smooth filter- median
cvSmooth(imgThreshold, imgThreshold, CV_MEDIAN, 13);
//save
cvSaveImage("threshold.jpg", imgThreshold); }
所以我只需要在这里指定 rgba 值。
对此没有真正的答案。肤色变化很大(即使对于中年白人男性也是如此),然后当你加入灯光效果(过度曝光、曝光不足、低光、彩色入射光)时,你无法区分皮肤和非皮肤 仅像素的RGB值。
我的建议是选择一个合理的第一近似值,然后调整参数。并且不要 期望 能够在不考虑上下文的情况下准确地检测皮肤...不知何故。
您可以通过查看从谷歌搜索 "skin tone color chart rgb" 获得的其中一张彩色图表来进行初步近似。随你挑...
@Stephen C what do u mean by "pick sensible first approximation, and then tweak the parameters" ? Just picking 1 color from a palette and what then?
(忽略光效问题。)由于 RGB 中的颜色定义了 3-D space,我建议在 space 中有一个区域颜色为 "skin" 音调。问题是要获得该区域的合理近似值,您可以从 "skin" 色调的颜色图表开始,将它们绘制成 3-D 并找出一个简单的 3-D 外壳来包围它们......并且不会不要包含您眼中不合适的颜色。然后根据船体尝试您的 "skin detection" 并相应地进行调整。