|
Re: Controlling Axis Camera exposure time
The cameras unfortunately don't have a programmatic way to set exposure time numerically. They do have a few properties that influence it though. They are the Exposure Mode and the Exposure Priority. Mode has Auto, flicker-free 50Hz, flick-free 60Hz, and Hold Current. The default for the camera is Auto. Auto is "magically" obvious, Hold is very useful if you have a calibration procedure, and the other two are dithering the exposures to avoid aliasing with flickering light sources.
The priority has choices for None, Quality, and Framerate. For low-light situations, this will influence whether the camera increases the exposure time or ups the sensor gain. Longer exposure takes in more light but possibly lowers fps and introduces blur. Higher gain will introduce noise into the pixel values.
My suggestion is the same as is in the vision white paper. Develop a calibration procedure related to shining a bright light into the camera, setting it to auto, waiting a few seconds, then setting it to Hold. You can try to do this at the beginning of the match, but it should be fine to do it once, or once per venue. Demoing this, I often just point the camera up to the ceiling, but to be more accurate, you could use a white or gray matte surface, perhaps copy paper to bounce the light into the camera at a known distance, etc.
A team a few years ago did manage to find undocumented files on the 206 camera that contain the hold values. Theoretically, you could ftp files to the camera and reboot it, but WPILib doesn't do that. Also, the M1011 has more properties for exposure, but they are not exposed via WPILib.
Greg McKaskle
|