Go to Post The competition is about MUCH more than just the robot. If kids are glued to the robot all of the time, then they miss the rest of it... the other fun stuff, what makes FIRST, FIRST. - Kims Robot [more]
Home
Go Back   Chief Delphi > FIRST > General Forum
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 04-01-2009, 17:12
XXShadowXX's Avatar
XXShadowXX XXShadowXX is offline
They call me Cody.
no team (None currently :\)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2008
Location: Pontiac; MI
Posts: 408
XXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud of
Measuring distance with cameria

If the cameria on your robot measures that the hieght of a marker is " p " pixels at an distance of " c ", then if you are to move this item, and the item is " p' " pixels tall, then the distance of the object would be

d=c+ [(p-p')*(sec 1.79)]
if 1.79 is degrees, rounded (1 degrees, 47 minutes, 23.68 seconds to 1 degree, 47 minutes, 24 seconds)
right?
__________________
Is now an engineer thanks to FIRST.

Last edited by XXShadowXX : 04-01-2009 at 17:34.
Reply With Quote
  #2   Spotlight this post!  
Unread 04-01-2009, 18:48
Luke Pike's Avatar
Luke Pike Luke Pike is offline
Programmer
FRC #1501 (THRUST)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2008
Location: Huntington
Posts: 114
Luke Pike is a name known to allLuke Pike is a name known to allLuke Pike is a name known to allLuke Pike is a name known to allLuke Pike is a name known to allLuke Pike is a name known to all
Re: Measuring distance with cameria

I wasn't going to try to determine the distance with the camera, instead I was going to use an ultrasonic sensor pointed in the same direction as the camera. I don't think the difference in the height would be great enough, and you really need an accurate measure of distance in order to shoot a ball at it.
Reply With Quote
  #3   Spotlight this post!  
Unread 04-01-2009, 19:11
GaryVoshol's Avatar
GaryVoshol GaryVoshol is offline
Cogito ergo arbitro
no team
 
Join Date: Aug 2005
Rookie Year: 2000
Location: Royal Oak, MI
Posts: 5,740
GaryVoshol has a reputation beyond reputeGaryVoshol has a reputation beyond reputeGaryVoshol has a reputation beyond reputeGaryVoshol has a reputation beyond reputeGaryVoshol has a reputation beyond reputeGaryVoshol has a reputation beyond reputeGaryVoshol has a reputation beyond reputeGaryVoshol has a reputation beyond reputeGaryVoshol has a reputation beyond reputeGaryVoshol has a reputation beyond reputeGaryVoshol has a reputation beyond repute
Re: Measuring distance with cameria

The vision target on the trailer is at a fixed height. Your camera will be mounted on your robot at a fixed height; make it lower than the vision target. If you measure the angle (above horizontal) that your camera is at to point at the target, you can use trig to figure out how far away you are from the target.
__________________
(since 2004)
Reply With Quote
  #4   Spotlight this post!  
Unread 04-01-2009, 23:23
Adam Y.'s Avatar
Adam Y. Adam Y. is offline
Adam Y.
no team (?????)
 
Join Date: Mar 2002
Location: Long Island
Posts: 1,979
Adam Y. is a splendid one to beholdAdam Y. is a splendid one to beholdAdam Y. is a splendid one to beholdAdam Y. is a splendid one to beholdAdam Y. is a splendid one to beholdAdam Y. is a splendid one to beholdAdam Y. is a splendid one to behold
Send a message via AIM to Adam Y.
Re: Measuring distance with cameria

Quote:
Originally Posted by XXShadowXX View Post
If the cameria on your robot measures that the hieght of a marker is " p " pixels at an distance of " c ", then if you are to move this item, and the item is " p' " pixels tall, then the distance of the object would be

d=c+ [(p-p')*(sec 1.79)]
if 1.79 is degrees, rounded (1 degrees, 47 minutes, 23.68 seconds to 1 degree, 47 minutes, 24 seconds)
right?
No. It's surprisingly much more complicated than that. The main reason is that in order to do that you have to account for the distortions caused by the camera. I actually performed a calibration for my optics project using a 200.00 dollar camera. The distortion for some areas of the image was as high as 20 pixels.
__________________
If either a public officer or any one else saw a person attempting to cross a bridge which had been ascertained to be unsafe, and there were no time to warn him of his danger, they might seize him and turn him back without any real infringement of his liberty; for liberty consists in doing what one desires, and he does not desire to fall into the river. -Mill
Reply With Quote
  #5   Spotlight this post!  
Unread 05-01-2009, 01:04
geeknerd99's Avatar
geeknerd99 geeknerd99 is offline
Fire Hazard
AKA: Daniel Lin
FRC #0401 (Hokie Guard)
Team Role: Programmer
 
Join Date: Oct 2004
Rookie Year: 2005
Location: Blacksburg, VA
Posts: 276
geeknerd99 has much to be proud ofgeeknerd99 has much to be proud ofgeeknerd99 has much to be proud ofgeeknerd99 has much to be proud ofgeeknerd99 has much to be proud ofgeeknerd99 has much to be proud ofgeeknerd99 has much to be proud ofgeeknerd99 has much to be proud ofgeeknerd99 has much to be proud ofgeeknerd99 has much to be proud of
Send a message via AIM to geeknerd99 Send a message via MSN to geeknerd99 Send a message via Yahoo to geeknerd99
Re: Measuring distance with cameria

Quote:
Originally Posted by Adam Y. View Post
No. It's surprisingly much more complicated than that. The main reason is that in order to do that you have to account for the distortions caused by the camera. I actually performed a calibration for my optics project using a 200.00 dollar camera. The distortion for some areas of the image was as high as 20 pixels.
Photographers and camera geeks make a huge deal about lens distortions.

Why not simply use trig and a pan-tilt servo deal so you can read the elevation to the target?
__________________
Reply With Quote
  #6   Spotlight this post!  
Unread 05-01-2009, 01:22
nitsua60 nitsua60 is offline
Registered User
FRC #2785 (Prometheus)
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 1998
Location: Kent, CT
Posts: 15
nitsua60 will become famous soon enoughnitsua60 will become famous soon enough
Re: Measuring distance with cameria

Quote:
Originally Posted by Adam Y. View Post
No. It's surprisingly much more complicated than that. The main reason is that in order to do that you have to account for the distortions caused by the camera. I actually performed a calibration for my optics project using a 200.00 dollar camera. The distortion for some areas of the image was as high as 20 pixels.
There's the magic word. Given the uncertain inputs to the analytical solution (unless you want to take apart that camera and do some serious optics testing) why not just image the vision target at a range of distances and generate an image height vs. distance curve? If that goes by too quickly, do it repeatedly in different areas of the image to correct for the aberrations.
Reply With Quote
  #7   Spotlight this post!  
Unread 05-01-2009, 07:24
Adam Y.'s Avatar
Adam Y. Adam Y. is offline
Adam Y.
no team (?????)
 
Join Date: Mar 2002
Location: Long Island
Posts: 1,979
Adam Y. is a splendid one to beholdAdam Y. is a splendid one to beholdAdam Y. is a splendid one to beholdAdam Y. is a splendid one to beholdAdam Y. is a splendid one to beholdAdam Y. is a splendid one to beholdAdam Y. is a splendid one to behold
Send a message via AIM to Adam Y.
Re: Measuring distance with cameria

Quote:
Originally Posted by nitsua60 View Post
There's the magic word. Given the uncertain inputs to the analytical solution (unless you want to take apart that camera and do some serious optics testing) why not just image the vision target at a range of distances and generate an image height vs. distance curve? If that goes by too quickly, do it repeatedly in different areas of the image to correct for the aberrations.
That is pretty much the idea. I unfortunately don't know what type of Labview distribution you have which means that it may or may not have the capability to do the calibration.
Here is a URL for some concepts about camera processing.
__________________
If either a public officer or any one else saw a person attempting to cross a bridge which had been ascertained to be unsafe, and there were no time to warn him of his danger, they might seize him and turn him back without any real infringement of his liberty; for liberty consists in doing what one desires, and he does not desire to fall into the river. -Mill

Last edited by Adam Y. : 05-01-2009 at 07:29.
Reply With Quote
  #8   Spotlight this post!  
Unread 05-01-2009, 08:08
XXShadowXX's Avatar
XXShadowXX XXShadowXX is offline
They call me Cody.
no team (None currently :\)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2008
Location: Pontiac; MI
Posts: 408
XXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud of
Re: Measuring distance with cameria

Quote:
Originally Posted by GaryVoshol View Post
The vision target on the trailer is at a fixed height. Your camera will be mounted on your robot at a fixed height; make it lower than the vision target. If you measure the angle (above horizontal) that your camera is at to point at the target, you can use trig to figure out how far away you are from the target.
sounds by far the simplest solution, of course the object will still get smaller the further you are from the object, so it wall have some margin of error, it will still need some optic curve...
__________________
Is now an engineer thanks to FIRST.

Last edited by XXShadowXX : 05-01-2009 at 08:14.
Reply With Quote
  #9   Spotlight this post!  
Unread 05-01-2009, 08:26
pgaston pgaston is offline
Registered User
FRC #2103
 
Join Date: Dec 2008
Location: Gloucester, MA
Posts: 9
pgaston is an unknown quantity at this point
Re: Measuring distance with cameria

And, what about the mass of the image you've found? i.e., the number of pixels inside the image blob defined by your color parameters.

That *should* vary enough to give you some measure as to distance - though experimentation is obviously next. Perhaps this could be combined with the trig calculation?
Reply With Quote
  #10   Spotlight this post!  
Unread 05-01-2009, 08:28
XXShadowXX's Avatar
XXShadowXX XXShadowXX is offline
They call me Cody.
no team (None currently :\)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2008
Location: Pontiac; MI
Posts: 408
XXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud ofXXShadowXX has much to be proud of
Re: Measuring distance with cameria

see first post, that what i was doing, but as i understand it the angle that objects change size at changes meaning you have to use a curve not only that but you need to account for optical defermations in the lens
__________________
Is now an engineer thanks to FIRST.
Reply With Quote
  #11   Spotlight this post!  
Unread 05-01-2009, 14:44
elfinn elfinn is offline
Team 166 Mentor
AKA: Beth Finn
FRC #0166 (Chopshop Team 166)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2004
Location: Merrimack, NH
Posts: 14
elfinn is an unknown quantity at this point
Re: Measuring distance with cameria

Size of the target is an easily obtained value and would be a more accurate measure of distance than the mass. The mass may be misleading if the particle returned has holes or is truncated by glare or bad parameters. But the height and width of the particle would vary directly with distance.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
White Paper Discuss: Measuring Distance with Analog Potentiometers Daniel Extra Discussion 4 26-11-2008 13:52
Help with Angles and distance charlie1218 Programming 5 13-12-2007 18:54
Measuring Muzzle Velocity Team 614 Rules/Strategy 8 28-01-2006 14:53
Measuring Motor Characteristics DonRotolo Motors 1 08-01-2006 19:39
SHU measuring stick sanddrag Rules/Strategy 13 08-01-2003 21:23


All times are GMT -5. The time now is 22:29.

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