View Single Post
  #4   Spotlight this post!  
Unread 23-02-2007, 14:21
Chris_Elston's Avatar
Chris_Elston Chris_Elston is offline
Controls Engineer
AKA: chakorules
FRC #1501 (Team THRUST)
Team Role: Engineer
 
Join Date: Feb 2004
Rookie Year: 2001
Location: Huntington, Indiana
Posts: 747
Chris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond repute
Re: How do YOU find the distance from the light?

The CMU camera reports a blob or size.

If the object is far away the blob size value will be small. If the object is close to you, the blob will be a large value. A blob is the green light.

Since the green light is a fixed object size, and your camera FOV (field of view) is a fixed size, you can mark out calibration points on the floor to determine a relationship of depth perception.

For example setup your camera and light, look at the size number the camera reports.

If your ten feet away, record the size of the blob, mark out set distances on the floor with masking tape. 0 feet, 1, 2, 3, 5, 10, 20 feet. Move camera to each distance. Record camera values.

You should get a fairly linear relationship in distance to size of blob the camera is reporting back to the RC.

Once you have this distance calibrated, you now can convert these values to a distance measurement.

Example maybe 100 "blob size" values equal 5 feet, you should also be able to calculate your cameras resolution value.

1 pixel = so many inches... This will be your robot accuracy.

Word of caution. Calibration with this procedure will change if you:

1. reteach the camera to a different color or RGB signature.
2. re focus the camera lens be twisting the lens.

If you do any of the above, you must repeat your calibration procedure to obtain this highest point of accuracy.
__________________
Team T.H.R.U.S.T. 1501
Download all of our past robot's source code here:Repository

Favorite CD quote:
"That can't be their 'bot. not nearly enough (if any) rivets to be a 1501 machine." ~RogerR: Team #1369