Camshift Algorithm and Grayscaled Images
I was wondering whether we could use Camshift with non-HSV images, as every solution on internet simply convert the image into HSV space, single out the H channel and then go further. However, I am supposed to work with grayscaled images, therefore I cannot go for HSV space.
Is there a way to use Camshift algorithm in OpenCV, without being bothered by HSV space and all? Or does it algorithm strictly require HSV space convertion? I looked into OpenCV exaple of Camshift, and there also HSV is used.
What do you think?
camshift is trying to track unique values (like e.g. a certain colour). your grayscale images will have a lot of places with near identical intensity, so, unless you have a scene with very high contrast (like a white blob against black background) chances are low, that it'll work.
I have my object surrounded with a red boundingbox, this red color is quite unique in my images, since all other colors are non-red colors. Given this, do you think camshift will be able to track the boundingbox?
Edit: I want to do more or less the same as this: http://blog.christianperone.com/?p=2768
What different is, my image is grayscaled. I have my object detection algorithm running already, all I want to do is to track the detected object now.
"However, I am supposed to work with grayscaled images" - well, no real difference between red, green, or blue in grayscale.
Sorry, I guess I phrased myself wrongly. I am conducting my detection algorithm on grayscaled input, since my camera is infrared camera. However when I am done with the detection, i create a red boundingbox around the detected object, and for this i use an rgb image. At the end, you can safely assume that my image has 3 channels. The detected objects are surrounded by colored rectangles, everything else is grayscaled.
oh sure, different story then.
i guess, it's about time to just try it out now ?
there are some problems regarding tracking in my case.
my camera is not static/stable, it changes its location constantly (it's mounted on a moving vehicle), would camshift be roboust to that?
it guess, it will still work (not much difference between a moving object and a moving camera).
just start coding ;)