The QuickCam is intended to be mounted on the Lego robotic explorer as its vision system. Unfortunately, no wireless communication to the base station is available so the length of the wire to the QuickCam places a limit on the roaming range of the robot. The connection is to the parallel port of the Arcom board.
The camera is monochrome with 4 bits per pixel. The basic frame size
is given by the definitions
qc_frame_width in the driver header file. These values
are currently 240 lines in height and 288 pixels in width (but could
change in later driver releases). There are also modes of
decimation which reduce the size of the image. This might be
useful if transfer speed to the host PC becomes a problem.
The QuickCam driver provides the following functions:
void qc_initialise(int decimation_mode, int packed_pixels)
This must be called before any attempt is made to grab a frame or to
set contrast or exposure. The auto-adjust operation which the camera
performs during initialisation may take several seconds to complete.
Contrast and exposure levels are set to the default values given by
the driver header file definitions
decimation_mode should be set to one of the
values 0, 1 or 2. Decimation mode 0 gives the basic image size (240 *
288 pixels). Mode 1 skips every other pixel in a line and every other
line (120 * 144 pixels). Mode 2 gives one pixel in four and one line
in four (60 * 72 pixels).
packed_pixels should be set to either
FALSE. When the value is
TRUE, the 4-bit pixels are packed two to a byte by
qc_getframe. The first pixel of each pair is the most
signficant quartet of bits and the second pixel is the least
significant quartet. (This happens to be the format used by WinCE
bitmaps.) Alternatively, for the value
qc_getframe puts one pixel in each byte. This might be
useful if some compression scheme were to be used before transmission
of the image to the host PC.
void qc_set_contrast(int contrast)
Values of parameter
contrast should be in the range
1-255. The value remains set thereafter until changed by a further
call or upon re-initialisation. The default value
qc_default_contrast in the header file is the Connectix
recommended value of 104.
void qc_set_exposure(int exposure)
Values of parameter
exposure should normally be in the
range 1-254. The default value
the header file happens to be 150 but this may well need adjusting
depending on lighting conditions. The value 255 puts the camera into
bulb mode i.e. unlimited exposure time. This is cancelled by
any value less than 255 set subsequently (the value 1 is recommended
void qc_getframe(unsigned char *buffer)
A complete image is retrieved from the camera using the decimation and
packing settings set during initialisation. An
char buffer area of adequate size must be declared in the WinCE
application and its address passed in the
The driver's header file to be included in your WinCE application code
can be found in qc.h
(right click and `Save As...').
The driver itself is provided in WinCE object form (for NDA reasons) at qc.obj for C programs (filename extension `.c', and at qcc.obj for C++ programs (filename extension `.cpp'). This file must be added to your WinCE application project within the Embedded C++ system in order to be linked in with your code by the `build' command. (Project -> Add to Project -> Files... )