Contents:
This page last updated on Sat Apr 20 16:53:45 EST 2002
$Revision: 1.4 $
In the continuing battle with the Evil Empire, I have recently reduced
my dependance on Them by one application - I discovered a way to use my
Casio QV-10a digital camera with Linux.
This article is a simple HOWTO on the method I used - hopefully to
encourage more people (and perhaps Casio?) to use Linux.
One of these days, every peripheral will ship with Linux drivers and
support software - until then, let's "share and enjoy"! (Douglas
Adams, Hitchhikers Guide to the Galaxy).

Describing the camera in full is probably best left to
Casio
but suffice to say that it has:
- fixed focal length lens (no zoom)
- fixed resolution of 320x240 pixels in 24-bit colour
- up to 96 shots in Flash memory (immune from low battery power)
- takes 4 AA alkaline cells or an optional external power source - but not NiCad
- has a serial link to a PC
- a separate printer is available, driven directly by the camera
- camera can also output to TV/video
- the default file format is CAM - proprietary to Casio (can be converted to JPEG, TIFF etc)
- sells for about S$400 in Singapore (about US$263) although I paid
a lot more than that last Christmas - prices have dropped!
The resolution of the pictures is adequate for simple Web page
purposes but nowhere near as fine grained as some of the models
recently come on to the market. By comparison, a Kodak PhotoCD image
digitised from a 35mm slide or film would be about 3000x2500 pixels -
about 100 times the number of pixels. On the other hand, while the
resolution is so-so, the roughly 25-kbyte files that are produced are
reasonably fast to download with todays modems.
It is quite possible that Casio's proprietary CAM format is superior
to others for certain purposes - I am no graphics expert - but it is
certainly no good for Web pages without conversion to JPEG or GIF
files. The Windows software that Casio provides makes it very easy to
convert a file to one of these other formats - but as no batch
conversion program is provided, it is very laborious to convert more
than one or two files. The process for each conversion is:
- open CAM image on PC (10 seconds on my 486)
- Pull down File|Export menu or hit ^E
- Pull down Format|JPG
- Type in new file name (.jpg extension is provided automatically!)
- Hit OK
On one file this is OK, but on 96 shots - forget it!
Contents
qvplay(1) was written by ken-ichi HAYASHI and Jun-ichiro "itojun"
ITOH to control the QV-10 and it is really great!!!.
With qvplay(1) running on Linux you can:
- Download individual or groups of pictures to or from the camera
in JPEG, BMP, PPM, RGB or CAM formats.
- Instruct the camera to take a picture
- Delete pictures from the camera's memory
- Instruct the camera to display a certain picture (or 4 or 9
thumbnail pictures)
- Protect or unprotect specific pictures from deletion.
In other words, pretty much everything you can do with the Casio
software except for managing Casio's photo-albums.
You may not be surprised that qvplay(1) on Linux is about
30-kbytes in size as an executable whereas on Windows the Casio
qvlink software takes up about a megabyte. The price of GUI or
just old fashioned Windows bloat?
As qvplay(1) is a batch or command-line program it is not as easy
for the novice to use but is very powerful for someone willing to read
the manual page and customise scripts.
It seemed to me that the quality of the pictures from qvplay(1)
was rather better than from the QV-LINK software provided with the
camera - apparently, some older versions of QV-LINK do some automatic
re-touching of the pictures which seems to rather get in the way.
Also included in the qvplay(1) package were two utilities:
- qvrec(1)
- To send CAM files to the QV-10 camera
- qvalldel(1)
- To clear the camera's memory
Contents
I used version 0.92 of qvplay(1). To find it, just use HotBot,
Excite! or another search engine to find qvplay-0_92_tar.gz and
download from the site nearest you.
You might also try ken-ichi HAYASHI's home pages in
English or
Japanese.
Contents
This really couldn't be easier - just expand the distribution file and
follow the instructions. A setup script is provided that worked
just fine "out of the box" - I am using RedHat Linux 4.1 with a 2.0.18
kernel.
One thing you might want to tinker with is the default serial port for
qvplay(1) to
use - I changed the supplied default of /dev/cua1
to
/dev/cua0
.
Once you're happy it's working, just do a strip
on the
executables and make install
.
Contents
According to the source code, qvplay(1) appears to support the
following cameras:
- QV-10 in its various flavours e.g. QV-10a
- QV-11
- QV-30
- QV-100 (including the fine resolution)
- QV-300 (including the fine resolution)
The only camera I have tested is the QV-10.
Contents
I wrote a couple of manual pages for the software (not in the original
distribution) which you can read or download by clicking here:
Plain text:
HTML version (run through groff2html):
man(1) source for ngroff/groff:
Contents
Once I got the hang of qvplay(1) I wrapped it up in a couple of
simple scripts to do the things I normally do without reading the
manual pages. Here they are:
get_a_pic A simple script to get one photo.
get_all_pics Another way to get all the photos from the camera.
There is just one simple but weird thing that you have to do after
converting from CAM to JPEG with qvplay(1) and that is to fix the
size of the JPEG images (see the get_a_pic(1) script). I must
confess I don't fully understand what's going on here but apparently
the images come across as 480x240 pixels and you need to change them
to an aspect ratio of 4:3 or 320x240 pixels.
You can do this with the xv(1) program (use the -4x3 option) or
by using the Independent JPEG Group's commands, djpeg(1) and
cjpeg(1) together with the Poskanzer portable bitmap utilities:
qvplay -g 1 | djpeg | pnmscale -xsize 320 -ysize 240 | cjpeg >
foobar.jpg
These utilities are normally found on the various Linux distributions.
Contents
You can view your JPEG files quite nicely with xv(1) or with a
WWW browser such as Netscape. In the later case, you might want
to generate HTML index files for your shots using something like the
following automatic procedure.
Assuming your JPEG files are sitting in a directory - e.g. I keep all
the files from one day's shooting together under a directory labelled
with the date, something like ~/photos/971128/*.jpg - I then run the
following script on them to create an index page viewable by the
browser. This could be put into a Makefile:
(cat hdr
ls $i*.jpg |sed "s/^/<IMG SRC=\"/" |sed "s/$/\">/"
cat tlr) > index.html
The files hdr simply contains a standard HTML startup:
<HTML>
<HEAD>
<TITLE>Photo viewer</TITLE>
<META NAME="Author" CONTENT="Bob Hepple">
</HEAD>
<BODY>
<H1>Photo viewer</H1><HR>
Similarly, trl contains your standard HTML wrapup script:
<P>
<HR>
<ADDRESS>
<A HREF="mailto:bhepple@pacific.net.sg">Bob Hepple</A> <P> Copyright © 1997 Bob Hepple. All rights reserved.
</ADDRESS>
</BODY>
</HTML>
Contents
There is also a tcl/tk wrapper for qvplay(1) which provides a GUI
interface. Here is a screenshot of the program, which can be found at
the author, Mr. Amano's
homepage

As a tcl/tk script, qvplaytk(1) is very easy to configure and
adapt. For example, you might like to change the obscure "G", "S" and
"T" buttons to, say, "Get", "Save" and "Take".
One very nice feature of qvplaytk(1) is that the "Take" mode
allows you to take a photo every N seconds - this could be used in a
remote monitoring application, or perhaps for those strange web sites
which offer a changing view of the level of the coffee in the
kitchen. Or just keep an eye on your kids...
Apart from qvplay(1), qvplaytk(1) requires tcl 7.4 and tk
4.0 or tcl 7.5 and tk 4.1. It also relies on xv(1) for the
viewing functions.
Contents
Itojun also wrote cam2jpeg (sometimes written as camtojpeg)
as a filter to batch convert CAM files to JPEG or to PPM formats. It
works with a whole range of Casio products that output the CAM format
such as the QV-10, 10A, 30 and 100.
It can also be found through ken-ichi HAYASHI's as above.
Contents
The camera works well in full daylight, as in this scene of the
Singapore River from the famous "Boat Quay":

as well as in very low light conditions,
in one of the wonderful food centres, "Lau Pau Sat" in the business
district:

Contents
since March 18th 1998
This page last updated on Sat Apr 20 16:53:45 EST 2002
For corrections/additions/suggestions for this
page, please send email to: Support Copyright© 1997-2002 Bob Hepple. All rights reserved.'