|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
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? Last edited by XXShadowXX : 04-01-2009 at 17:34. |
|
#2
|
||||
|
||||
|
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.
|
|
#3
|
|||||
|
|||||
|
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.
|
|
#4
|
||||
|
||||
|
Re: Measuring distance with cameria
Quote:
|
|
#5
|
||||
|
||||
|
Re: Measuring distance with cameria
Quote:
Why not simply use trig and a pan-tilt servo deal so you can read the elevation to the target? |
|
#6
|
|||
|
|||
|
Re: Measuring distance with cameria
Quote:
|
|
#7
|
||||
|
||||
|
Re: Measuring distance with cameria
Quote:
Here is a URL for some concepts about camera processing. Last edited by Adam Y. : 05-01-2009 at 07:29. |
|
#8
|
||||
|
||||
|
Re: Measuring distance with cameria
Quote:
Last edited by XXShadowXX : 05-01-2009 at 08:14. |
|
#9
|
|||
|
|||
|
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? |
|
#10
|
||||
|
||||
|
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
|
|
#11
|
|||
|
|||
|
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.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
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 |