sonic-snap v 1.7 sonic-snap is a webcam application specifically suited for the Sonix sn9c102 chip, found, e.g. on the Sweex minicam. Dependencies ============ sonic-snap is a v4l2 application, built on top of the sn9c102 linux kernel driver. This kernel driver can be obtained from http://www.linux-projects.org sonic-snap requires fltk version 1.1.x development environment. On debian, 'apt-get install libfltk1.1-dev' will give you this. OPTIONAL! sonic-snap can create MPEG video files using libfame. The fame project is not available in Debian, so you need to build it from sources, which you can get at: http://sf.net/projects/fame Features ======== Histogram analysis Normalization PPM capture Automatic gain control MPEG capture (optional) Building ======== Edit the first line of Makefile, and set USE_FAME to 1 or 0, depending wether you have libfame installed or not. You need libfame for mpeg output. $ make $ ./sonic-snap-gui $ ./sonic-snap-gui /dev/video0 176 144 The red histogram shows the values that were read from the sensor. The green histogram shows the values after normalization. There is also a command line version: ./sonic-snap -help Running this without arguments will create a single file named sonicsnap0001.ppm in the current working directory. To get more snaps, use count=100, to control the camera use gain=0.5 normalization=1 compression=1 device=/dev/video0 to do time-lapse photography, use skip=100. Known bugs ========== Histograms are visible in image snaps and movie captures. You need to switch of the histograms if you don't want them in your snaps. Huffman decoding is not yet 100% complete, as in compressed mode, some invalid codes are encountered. Compression on/off influences brightness. This is a driver issue, not an application issue. There is no sound with the MPEG output. The MPEG output is not synchronized. The record fps is simply the rate at which the images can be retrieved from the camera, and handled by the software. Kernel driver sn9c102 v 1.19, which is in linux 2.6.10 is bugged. Gain control does not work, neither does uncompressed mode. To fix this, use kernel driver 1.21 or higher from the linux-projects.org site. (in linux 2.6.11 version 1.22 is present, which works as well). Autogain makes the gain sway between low and high. This is because I did not use a proper PID (Proportional, Integral, Derivative) control. You may get an assertion failure complaining about the height not being 288. For me, this was solved by upgrading my linux kernel headers. An old version of videodev2.h was bugged w.r.t. RW bits of CROPCAP ioctl. Does not work with fltk2.0 yet. Contact ======= If you get it to work with your camera, why not send me a snapshot? I can be reached at bram at sara.nl