Detecting a water bottle in video stream C++
Hi All, I am doing a robotics competition and I need to figure out how to locate a standard water bottle in a video stream and give the location of it on the screen. I have some code for shape detection but it hasn't located the bottles when I feed it an image of it. The bottle is exactly the same as this one, 19.9 fl oz absopure brand Here Any ideas or thoughts are appreciated.
Thanks, L
I think a keypoints feature detector is what you need, have a look in this official tutorial of opencv
I got the example to work but it is not zeroing in on the object. Of the 50 odd points it find only 10 or so are on the 2 bottles. Is this normal?
How do you use the feature detection? Most examples assume flat objects so how did you integrate the radius of the bottle?
I didn't. I tried feeding it various 2d images of the same brand water bottle to no avail. Of all of my tests with different parts of the bottle to match, less than 10% of the matching points landed on the bottle and less than 2% on the same location of the bottle. I am still trying to figure out how to recognize it. Due to the schedule for this project, any and all ideas or thought, especially answers, are appreciated. Also could could I use a depth image from a Kinect to isolate the objects as they are the nearest things in the foreground.
Initial feature detector combined with something like a TLD tracker could do the trick for you. You will need to test several features to see which sort yields the best results on your object. Since you know the exact object, using model based classifiers is overkill since you don't have enough object class variation. You could go for an initial shape based template matching to find a possible location.