The dcam_capture command-line utility was developed to provide an interface to the camera for scripts. The utility makes use of the DCAM API, which is documented in "Prosilica DCAM API.pdf" (available on CVS, see "How to modify the dcam_capture utility"). With dcam_capture you can capture a single image or a number of images with different exposures. To use dcam_capture, follow the first two steps above in order to connect the camera to anduril and log in. It is a good idea to follow all of the steps above to make sure the camera is working correctly and focused on the object you wish to capture before using dcam_capture. Once the camera is set up and you are logged in, do the following:
- Start Cygwin.
- Type
dcam_capture (which is equivalent to dcam_capture -help ) to see the usage information. You will get the following output.
$ dcam_capture
Prosilica DCAM Single Capture Utility
Usage: dcam_capture filename [-e exp_time] [-o offset] [-g gain] [-m gamma] [-r x y w h] [-f format] [-s]
filename Currently supported extensions: .PNG, .JPG, .PGM, .PPM, .BMP
Use %lu to include exposure time in filename.
-e exp_time Set exposure time in microseconds.
For multiple exposures, use -e t1,t2,t3,...,tn
-o offset Set DAC offset.
-g gain Set pre-DAC gain.
-m gamma Set gamma (0 or 1).
-r x y w h Set region of interest. pixel (x,y), width w and height h.
-s Enable sub-sampling.
-f format Set format. Currently supported formats:
mono8, rgb24, raw8, (mono16, raw16 for PNG only)
-help Display this help message.
The arguments are fairly self-explanatory. The image file format is determined by the extension, and the data format is set using the -f option. The camera parameters are all optional, and will take on default values if not specified. These default values will usually be the last known value (ie: if a value was set using the vendor-supplied viewer). However, it is a good idea to explicitly set the important parameters such as exposure time and format. Note that 16-bit single channel images can only be saved as PNG files.
When specifying the image filename you can include the exposure time in the filename by placing %lu in the filename. For instance, if the filename is outImg%lu.png and the exposure time is 500 milliseconds, then the file will be saved as outImg500000.png . Multiple exposures can be captured with a single call to dcam_capture using the argument -e t1,t2,t3,...,tn . In this case, it is essential to include the %lu in the filename, or each exposure will overwrite the same image file.
The latest version of dcam_capture has been placed in the /bin directory of Cygwin on anduril, so you should have no problem accessing it from any directory of your choice. |