How to determine if image contains object of certain color
Hey - I am very new to opencv, and learning as I go. How would one determine if an image contains an object within a certain color range, i.e. determine if an image contains a green ball in python?
http://www.aishack.in/2010/07/tracking-colored-objects-in-opencv/ (C++) http://aravindc.com/2012/12/26/color-tracking-opencv-python-and-my-first-post/ https://bradmontgomery.net/blog/2008/01/24/tracking-a-laser-pointer-with-python-and-opencv/
That first one is a nice C++ tutorial, google around for a better python example. But basically you'll want to convert video frames from RGB color space to HSV color space. Then you can easily threshold the images to show only pixels that fit some desired Hue range.