LavaRnd Logitech QuickCam 3000 Pro webcam settings
To maximize the noise to signal ratio of the
LavaRnd cranks up the webcam settings to maximize the chaotic
noise that the CCD records.
The following sections describe these settings.
Linux module setting
The /etc/hotplug/usb/pwc performs the following modprobe:
/sbin/modprobe pwc size=vga fps=15 leds=250,750 fbufs=2 mbufs=1 compression=0
Open camera state
The camset tool:
reports that the default LavaRnd open state of the camera is as follows:
camset pwc730 /dev/video0 -L -v 1
Camera name: Logitech QuickCam Pro 3000
Philips camera type: 730
Picture brightness: 65024
Picture colour: 65468
Picture contrast: 64512
Picture gamma: 63488
Picture depth: 24
Min width: 160
Min height: 120
Max width: 640
Max height: 480
Framerate (fps): 30
Compression preference: 0
White balance (2): fluorescent
LED on time: 25500
LED off time: 19100
Electronic sharpness: 64512
Backlight compression (0): OFF
Flicker suppression (0): OFF
Dynamic noise reduction (0): OFF
Manual gain control (AGC): 0
Video mbuf size: 460800
Video mbuf count: 1
Palette: YUV 4:2:0 Planar (15)
Camera sanity check parameters
To help ensure that the camera is operating in a proper fashion, the
LavaRnd camop layer performs the following sanity checks as reported by
the camset tool:
NOTE: In the above, the frame refers to only the chaos potion
of the frame.
See the camera frame size below.
17 most frequent octet values are considered common
max fraction of frame containing common octet values: 0.557056
20 most common values must be < 1/2 of frame octets
max fraction of bits same in next frame: 0.300359 (min is 1-max = 0.699641)
Camera frame size
When using the -L default LavaRnd settings,
the following frame information is reported by the camset tool:
read size: 460800
read LavaRnd offset: 0
read LavaRnd length: 19200
mmap size: 460800
mmap frame size: 460800
mmap frames: 1
mmap LavaRnd offset: 0
mmap LavaRnd length: 19200
will use mmap I/O
mmap image: 460800
chaos size: 19200
chaos offset: 0
LavaRnd output rate
We use the lavadump tool to measure the amount of time
it takes for LavaRnd to output 1 Megabyte (1048576 octets)
for a given camera.
When using lavadump, we set the default LavaRnd parameters
(see above), and we disable the normal warm-up wait period.
These tests were perform on a Linux system with a
detected 1529.526 MHz Athlon processor (3053.97 BogoMIPS)
using the following command:
time lavadump pwc730 /dev/video0 1048576 alpha_rate -L -T 0 >/dev/null
lavadump of 1 Megabyte
You should remember that the lavadump tool, while it performs
the LavaRnd Digital
Blendertm Algorithm using the server libraries,
is intended for use as a test tool only.
One should use the LavaRnd application interface
and allow the lavapool daemon to access the
webcam and buffer the random numbers.
An application using the
can receive random data at a high rate as long as the
lavapool daemon's buffer contains random data.
the size of the lavapool buffer by adjusting the poolsize
value in the cfg.lavapool file.
So unless your application requires a great deal of random data
over an extended period of time, the actual output rate of the
webcam may not be that important.
An alpha rate of 8.0 is used when the
lavapool buffer is below the fastpool
As the buffer level increases to the slowpool,
the alpha rate drops to 1.0.
Above the slowpool an alpha rate of 1.0 is used.
The above timings suggest that the random data output rate
is not limited by the CPU, but rather by the webcam's ability to
The limiting factor in webcam chaos output may be a combination
of the webcam frame rate & size, perhaps the
webcam signal to noise ratio, and the webcam data transfer rate.
We use the imgtally tool to process 131072 frames:
imgtally pwc730 /dev/video0 131072 /var/tmp/tally_file -L -v 2
to produce the following entropy measurement on the
data found in a webcam frame:
Shannon entropy bit measure: 152745.76
Shannon total image entropy: 123567.49
Shannon estimate entropy/pixel: 6.4358
NOTE: The above is not a measurement of LavaRnd's output,
it is a measurement of the
that would have been feed to the
Blendertm Algorithm to produce random data.
Luminance octet value distribution
Using the gnuplot on the /var/tmp/tally_file
file (produced by the previous imgtally command),
we can observe the distribution of octet values within the raw
webcam page for information about
other webcams that LavaRnd supports.
For more information using the Linux pwc driver, see Landon Curt Noll's
Philips / Logitech USB camera setup for RedHat Linux page.
The use of such webcam's are not limited to Linux.
The Philips / Logitech USB camera is recognized by Mac OS X.