Question

I need to cunstruct color histogram (using HSV color space) in SimpleCV, the problem is that the histogram needs cointain only colors where saturation and brightness are over certain level (which is different of each channel). How do I achieve this?

I'm fairly new in the field of computer vision, so i don't even know which keywords to google, so if anyone knows of even some good website or an article to read more about the matter it would also be very helpfull.

Regard, Andraž

Was it helpful?

Solution

In OpenCV you can use cv2.inRange(src, lowerb, upperb[, dst]) --> dst

hsv_filtered = cv2.inRange(hsv, [0, low_sat, low_value], [255, 255, 255]) to filter out the values you are interested in.

Apart from SimpleCV, take a look both at the OpenCV python bindings (I think you can use those directly in SimpleCV (import cv2) but not sure) and also on SciPy:

http://docs.scipy.org/doc/scipy/reference/ndimage.html for histogram functions.

I guess there should be a similar function in SimpleCV as well but I'm not familiar with that.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top