02-27-2012 11:43 AM
early in the season we were able to get the rectangular target processing example to see the target and give a distance from it, when we installed the leds.
now are wanting the camera to track the target using the servos to move the camera.
i can't see anywhere in this example where that is implemented. is this another example or it there a way to get track distance and camera tracking from this example??
02-27-2012 11:50 AM
I don't have the example in front of me right now, but if I remember correctly, one of the outputs is an array of particles that were detected. For each particle there is a distance and a position. Once you identify which particle you want to track (you might get multiple particles if your camera can see more than one target), you can then use the position and distance information for tracking.
02-27-2012 01:00 PM
You will need to load the example, camera with servos. It was written for a different game so it tracks colors not rectangles but you should get the general idea of how to link the image to the servo drives. THere is also a PDF tutorial on image tracking that documents how to compute distance and angles from the Axis camera so that you can build a cross-hairs and rotate or slide the robot until the camera servos are at the home position. The X,Y data in the target matrix show the center of the rectangle on the scale of the camera field of view. (-1 to +1, -1 to +1) so when the camera is at servo position (0,0) and the target center is at (0,0) the camera and the robot are aligned with the target.