View Single Post
  #4   Spotlight this post!  
Unread 01-02-2009, 23:11
nathanww nathanww is offline
Hacker
FRC #1678 (Citrus Circuits)
Team Role: Programmer
 
Join Date: Dec 2008
Rookie Year: 2007
Location: Davis, CA
Posts: 224
nathanww is just really nicenathanww is just really nicenathanww is just really nicenathanww is just really nice
Re: how to find distance using two color servo camera?

There are a couple of ways to calculate distance with a camera. The ones I can think of off the top of my head are:
  1. Figure out what part of the visual field the object occupies, and assume that higher=farther
  2. Use relative size--based on the law of perspective, the farther an object is, the fewer pixels it will occupy
  3. If the object isn't moving, you can use the laws of parallax to calculate the distance based on apparent movement at a given robot speed.
__________________
Get yer robot source code here!
Reply With Quote