This is a simple application with OpenCV Library using HSV color system to segment the blue spectrum color on a given input image, in this case, video frames from a webcam.
the procedure was:
1 - Convert the RGB image to HSV
2 - Split HSV image and get the Hue Plane
3 - make all values outside 90~135 range as zero (H S and V values), remember that opencv divide the real value of an HSV image by 2
4 - smooth the result image using a gaussian filter 15x15
5 - convert back the result image to RGB color system
6 - make it grayscale
you can use mathematical morphology to improve the results (dilate and erode functions) and then binarize it.
after converting to hsv you could take just the hue plane and work with that. Seems to me it would save up some processing power.
femistofel 2 years ago
Yes, I'm doing that, I just forgot to put it on description field. Thanks =D
DDoiS 2 years ago