View Full Version : Blob Size
d.courtney
29-01-2006, 18:32
I was wondering if it would be possible to know how far away the goal is by the blob size alone...is this possible? You'd think it would be as long as you know the actual size of the object you are tracking.
The main difficulty with that is that the blob will appear smaller if you are looking at it from an angle...
Kevin Watson
29-01-2006, 18:51
I was wondering if it would be possible to know how far away the goal is by the blob size alone...is this possible? You'd think it would be as long as you know the actual size of the object you are tracking.Yes, maybe. Keep in mind that the number of pixels will change as you keep a fixed distance from the green light, but rotate around it. Hmmm... Given that you kinda know how far away you are from the green light using the tilt angle, I wonder if you could then use the blob size to determine the angle.
Anyway, a better way might be to determine the height of the blob using y1 and y2 because the height won't vary much.
-Kevin
Eldarion
29-01-2006, 18:55
The main difficulty with that is that the blob will appear smaller if you are looking at it from an angle...
The other thing to remember is that the camera sensor is inherently noisy, and as such the blob size will randomly change by a small amount from frame to frame. You can also see the effects of the noise in that the centroid will "dance" by a few pixels even when everything is stationary, however the blob size is much more unstable. I learned this the hard way last year... :rolleyes:
coldabert
29-01-2006, 19:21
If you need a distance estimation I would recommend using the tilt values of the servos and the y coordinates of the blob. Confidence also decreases at large distances.
d.courtney
29-01-2006, 20:02
well I was just wondering because the team wants to fix the camera to our shooter, so it would be driven by a motor and two things would be changed at once... I was also thinking of keeping track with a sensor, and doing some conversion of teeth to angle... just exploring all the options, and this one just poped up, but it seems it is too unstable so any more ideas, or would the sensor be the best bet? Thanks
Andrew Blair
29-01-2006, 20:32
Heres what I would suggest. If you have to, you can still use the fixed mount to determine distance. I believe that there is a way to "shift" where the camera's center is (Maybe its shifting the centroid of the blob). In other words, you can have the camera pointing slightly offset of the target, yet still have it return center values.
So, have a routine that slaves the turret to the camera, until it finds the target. Upon finding the target, use the values to determine distance. Then, move the camera center values accordingly in order to correctly angle your shooter, if necessary. After that, unless it loses the target, you can subtract the current offset of the camera to determine current distance, and accordingly re-adjust the camera center to place your shooter "on zero".
I'm sure there is a more elegant solution, but perhaps this can be a place to start.
EDIT----------------------------------------
Post number 600!
d.courtney
29-01-2006, 20:48
well that is another way I didn't think of, thanks for the idea.
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.