FIRST Robotics Competition Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Help with the output numbers from the camera

I have got the camera up and tracking the target, but I am confused by the numbers that I get back from LabView.  For example, from ten feet away from the vision target I get a value back of 131.16 when the camera is locked on the furthest outside diameter of the vision target (this is a 38 inch diameter circle).  How is this value calculated?  How can I use it to determin the range I have to the target when my robot moves?

0 Kudos
Message 1 of 2
(3,421 Views)

Hi team2604,

These numbers that you are seeing depends on what steps you have used in your vision code. Since you are looking for the circular target, I'm guessing you're using the Circular Edge step. This step returns 4 values: Center X, Center Y, Current Radius and Current Deviation. Center X and Center Y is the position (in pixels) of the circular edge that was found in the image. Current Radius is the radius (in pixels) of the circle found and Current Deviation is the maximum distance found between the points of the edge and the fitted circle (i.e. the difference estimated circle and the actual edge). Keep in mind that by default these values are in units of pixels. If you want a value in inches/cm, you'll need to find an algorithm to do the conversion which is not a trival task since the distances will depend on how far away the objects are.

~Olivia

NI FIRST Support

0 Kudos
Message 2 of 2
(2,584 Views)