View Single Post
  #13   Spotlight this post!  
Unread 05-06-2013, 15:08
JamesTerm's Avatar
JamesTerm JamesTerm is offline
Terminator
AKA: James Killian
FRC #3481 (Bronc Botz)
Team Role: Engineer
 
Join Date: May 2011
Rookie Year: 2010
Location: San Antonio, Texas
Posts: 298
JamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to behold
Re: Using a Raspberry Pi for camera tracking

Quote:
Originally Posted by Joe Ross View Post
That's not necessarily true. Take a look at the images in 341's whitepaper. It was quite an ah-ha moment for us when we realized that their 640x480 images were the same size as our 320x240 images from that year.
Ah-ha... I think I get what you are saying... that is to use a fast exposure to get better compression for darker images that are optimal for target processing. That makes sense, but would limit the use of the camera to just targeting. The context I posted was for a dual use-case of being able to view images with video levels balanced and obtaining targeting information from that.

Thanks for this link... I was actually looking for it again... there is something in there I'd like to quote again here because it is really great advise.

From Jared341:

Changing the default camera settings is the most important thing you can do in order to obtain reliable tracking and stay underneath the bandwidth cap.

In particular, there are six settings to pay attention to:

1) Resolution. The smaller you go, the less bandwidth you use but the fewer pixels you will have on the target. If you make all of the other changes here, you should be able to stay at 640x480.

2) Frames per second. "Unlimited" results in a 25 to 30 fps rate under ideal circumstances. Depending on how you use the camera in a control loop, this may be overkill. Experiment with different caps.

3) White balance. You do NOT want automatic white balance enabled! Failing to do so makes your code more susceptible to being thrown off by background lighting in the arena. All of our Axis cameras have a white balance "hold" setting - use it.

4) Exposure time/priority. You want a very dark image, except for the illuminated regions of the reflective tape. Set the exposure time to something very short. Put the camera in a bright scene (e.g. hold up a white frisbee a foot or two in front of the lens) and then do a "hold" on exposure priority. Experiment with different settings. You want virtually all black except for a very bright reflection off of the tape. This is for two purposes: 1) it makes vision processing much easier (fewer false detections), 2) it conserves bandwidth, since dark areas of the image are very compact after JPEG compression. The camera doesn't know what you are looking for, so it will try to send you the entire scene as well as it can. But if it can't see the "background" very well, you are "tricking" the camera into only giving you the part you need!

5) Compression. As the WPI whitepaper says, this makes a huge difference in bandwidth. Use a minimum of 30, but you may be able to get away with more (we are using 50 this year). Experiment with it.

6) Brightness. You can do a lot of fine tuning of the darkness of the image with the brightness slider.