View Full Version : Yet another camera question.
I have my camera up and running, that's not the problem. The problem is that it doesn't pick up the soccer ball as a camera. I copied the camera classes straight from the original camera code and didn't change anything. Does anyone know what to change in the targetting code to allow the camera to pick up the soccer ball as opposed to other, minor cirlces?
Greg McKaskle
01-03-2010, 20:21
There have been other threads on this, but the short version is that the circle/ellipse finder is not really ideal for finding 3D balls. The primary issue is due to the shadow cast by the ball onto its lower half, and the loss of contrast in that area.
There are some methods to try and locate the ball on the carpet, but none of the sample code includes it.
Greg McKaskle
Are there any other alternatives to finding the ball besides finding it on the carpet?
TubaMorg
02-03-2010, 15:14
Could you please restate your question? It is vague and confusing enough that you may not get a useful response. This is the perfect example.
Could you please restate your question? It is vague and confusing enough that you may not get a useful response. This is the perfect example.
My apologies. I'm currently using the default camera code that was in the camera project. I didn't change any of the tracking code and whatnot. The code doesn't correctly pick up the soccer ball. It picks up portions of the ball here and there, but it's not consistent enough to run an effective autonomous mode off of. Are there any other ways I can change the camera tracking code so it picks up and locks onto the entire soccer ball? This is pretty important, seeing as how all our autonomous mode hinges on the camera working. I've seen some teams use the camera effectively, but I haven't seen any code that works 100% of the time.
TubaMorg
09-03-2010, 10:48
I see (no pun intended). You may want to look at what Greg said above to answer your question and work to implement alternative solutions. For example, though tracking a ball is rather difficult, locking on the target is fairly effective. So the next problem is to find the ball in autonomous. So you may not be able to see it, but your team has all the control on where to place balls before the game begins. In other words you will know how far the ball is from your starting position when you begin the match. If you can't track distance (no encoder or accelerometer), then you can try timing, which may be effective enough.
Good luck!
Jeanne Boyarsky
15-03-2010, 20:49
My apologies. I'm currently using the default camera code that was in the camera project. I didn't change any of the tracking code and whatnot. The code doesn't correctly pick up the soccer ball.
It's not designed to. The default camera code tracks the target not the soccer ball. We didn't try tracking the soccer ball, but had success with the target. Our camera is mounted too high to be useful for the soccer ball anyway.
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.