this question is about opencv with c ++ in VS2008 expression.
I make it very simple. Trying to get skin values from camera image.
As you can see in the screenshot, the camera image looks good. I convert it to HSV and separate the Hue channel from this in order to later generate the skin value. But the Hue channel seems too noisy and grainy. Also, the HSV image window shows information degradation. Why is this happening? and how to solve it. If we can’t remove the noise with some kind of smoothing? The code is as follows:
#include <opencv2/opencv.hpp> int main(){ cv::VideoCapture cap(0); // open the default camera cv::Mat hsv, bgr, skin;//make image & skin container cap >> bgr; //cvNamedWindow("Image"); //cvNamedWindow("Skin"); //cvNamedWindow("Hue"); cv::cvtColor(bgr, hsv, CV_BGR2HSV); std::vector<cv::Mat> channels; cv::split(hsv, channels); cv::Mat hue; hue = channels[0]; cv::imshow("Image", bgr);cvMoveWindow("Image",0,0); cv::imshow("HSV", hsv);cvMoveWindow("HSV",660,0); cv::imshow("Hue", hue);cvMoveWindow("Hue",0,460); cvWaitKey(0);//wait for key press return 0; }

source share