Using the Sanyo digicam with Linux

The Sanyo digicam (or VPC-G200) is a mid range consumer digital camera that offers a wide variety of features and good quality at a comparatively reasonable price (in Summer 1997 at least). The camera comes with software for Microsoft Windows 3.1 or 95 (it works with NT 4.0 too) that allows picture downloading, a useful degree of camera control and some image organisation and manipulation.

This web page describes information I have collected and my experiences using this camera with the Linux operating system. Most of this information is equally applicable to any UNIX like operating system.

You can find out more about the Sanyo digicam from

What you will need

Here is a list of software you will need to get started...

Putting it all together...

These are the scripts that I use with my Sanyo...

dcgetall connects to the camera and downloads all the pictures in it. It checks the camera connection (by calling dcnpics), downloads all the images and processes each file with jpgprocess.

jpgprocess renames a file to a name based on its unique picture number and if the file is a movie it creates an animated GIF by calling jpgtogifanim.

jpgtogifanim takes a Sanyo movie file, splits it into frames and merges them into an animated GIF file that can be used on the web. It examines the movie file to determine the appropriate frame rate for the GIF (5 or 10 frames per second) according to which movie mode was used.

You can download all the scripts in one archive.

Notes on using these scripts...

The scripts, and camediaplay, are works in progress. It's enough to download images and means I don't have to boot into MS windows but there is a lot that can't be done yet. Areas for improvement include

I wrote these scripts for my own use, so they could be more polished. If you have problems with the scripts then let me know at mrd@ecs.soton.ac.uk and I'll try to help. If you add any good features then I'd like to know too!

Sanyo JPEG files

The Sanyo stores its images internally as JPEG files. When pictures are transferred from the camera to a computer the files are simply copied across the serial link to the computer and stored on disk.

The Sanyo JPEG files contain a set of fields and values that record information about the camera, the picture and the camera settings when the picture was taken. This table summarises what I have guessed about them so far...

Sanyo JPEG fields
Field Description
TimeDate picture capture time in secs since 1970, -1 if not set
Shutter shutter speed in microseconds
Flash 1 if the flash was used, 0 otherwise
Resolution 1 for standard, 2 for high or movies
Protect picture protected? untested
ContTake movie type, 0 for stills, 16-10 for 10 fps, 16-5 for 5 fps
Type Camera type, SR4 for this model
Serial# serial number, no value
Version firmware version?, v04-73 for my camera
ID camera id, settable from software
PicLen picture length in bytes
ThmLen thumbnail length in bytes
P# sequential picture number, can it be reset?
QF JPEG Q value?
Rg Red, Green, Blue, Alpha? Maybe to do with the white balance or light level?
Gg
Bg
Ag
FSadj Fstop? 70=small aperture, 57=larger
s0 Lots of comma separated numbers...
T0 More comma separated numbers...

If you know what some fields mean where I have ?s then let me know. It might be useful for software applications... I have worked out that the indication of audio associated with a picture is not stored here anywhere.

Acknowledgements

Special thanks to itojun for camediaplay. Thanks to all who create and contribute to the utilities that make using this camera with linux possible.


Text and images by Mark Dobie, back to Mark's home page