PDA

View Full Version : getBoundingRectHeight() Units?


severhale
01-31-2012, 10:12 PM
This is my first year, and I found this really helpful paper on finding the angle and distance from the backboard from an image: http://www.chiefdelphi.com/media/papers/2324

The only problem is, it wants the height of the image vs the height of the actual tape square. I think i can get a particle analysis report and do getBoundingRectHeight() to find the height of the section but i don't know what units that would be in. pixels? if so, is there any way to convert that to inches so i can use it?

nickpeq
02-01-2012, 07:21 AM
Our camera (axis 206) has a supposed FoV of 55 degrees. So a target 24in wide would be about 23in away when image-width/rectangle-width = 1
I use 23 * image-width / rectangle-width as a rough approximation of distance.

kylevedder
02-01-2012, 07:33 PM
The bounding box height and width are measured in pixels. The best way to convert pixels to distance is when you have the bounding box's width being 'X' pixels wide you measure in the real world to know 'Y' inches form the target, and take multiple data points to set up a table to judge distance.

severhale
02-06-2012, 10:28 PM
kyle, i used your idea and got accuracy to within about 2 inches even at an angle :) I found that distance is inversely proportional to height of the bounding rectangle in pixels. d = about 15000/h, if anyone wants to know. That's also very close to nick's idea, which is 14,720 / width.