Go to Post Parallax is evil. - RoboChair [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 31-01-2012, 22:12
severhale severhale is offline
Registered User
FRC #4097
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Northampton, MA
Posts: 10
severhale is an unknown quantity at this point
getBoundingRectHeight() Units?

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?
Reply With Quote
  #2   Spotlight this post!  
Unread 01-02-2012, 07:21
nickpeq nickpeq is offline
Turing-complete
FRC #1255 (Blarglefish)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Baytown, TX
Posts: 60
nickpeq is an unknown quantity at this point
Re: getBoundingRectHeight() Units?

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.
Reply With Quote
  #3   Spotlight this post!  
Unread 01-02-2012, 19:33
kylevedder kylevedder is offline
Programmer
AKA: Kyle Vedder
FRC #0467 (Shrewsbury Colonials)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Massachusetts
Posts: 6
kylevedder is an unknown quantity at this point
Re: getBoundingRectHeight() Units?

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.
Reply With Quote
  #4   Spotlight this post!  
Unread 06-02-2012, 22:28
severhale severhale is offline
Registered User
FRC #4097
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Northampton, MA
Posts: 10
severhale is an unknown quantity at this point
Re: getBoundingRectHeight() Units?

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.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 12:46.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi