Tweaking a Camera to Suit a Hobby

Matthew Holst for The New York Times
Pete Lilja of Cedar Rapids, Iowa, likes to rig
his camera to a weather balloon and send it up to record the world. Software
lets him alter camera settings.
By PETER WAYNER
Published: May 26, 2010
When he is not fighting
fires in Waterloo, Iowa, Pete Lilja likes to rig his camera to a weather
balloon and send it up to record the world.
Pete Lilja
An image taken from a high-altitude balloon flight was photographed
with a Canon PowerShot A570is camera about 100,000 feet above northeast Iowa in
November 2009.
"I got a
picture when the balloon was at about 87,000 feet above northeast Iowa," he
said. "We could see Lake Michigan. That was pretty impressive."
To take
these photos, Mr. Lilja, of Cedar Falls, packed his Canon A570is with a GPS
transmitter in a cushioned box (and attached his phone number in case the GPS
failed). He chose that particular point-and-shoot camera because a group of
programmers from around the world had created software that gave photo
hobbyists like him the ability to change the way Canon intended the camera to
operate.
It is
called the Canon Hack Development
Kit (or C.H.D.K. for short). Mr. Lilja used it to reprogram his camera
to snap one shot every 15 seconds on its journey into the stratosphere.
The software has allowed photographers using more than 50 models
of Canon PowerShot cameras to reprogram the time lapse instructions to
record construction projects or to use motion-sensing programs to capture
animals in the deep woods. It can also be used to alter the camera’s exposure
control to produce imaginative images in difficult lighting. (The hacks do not
work with the more expensive D.S.L.R. cameras). Development of the hack kit
began as a volunteer project about three years ago. It can be customized by
adding programs written in "ubasic" or "lua," two common languages that are
fairly easy for programmers. Many C.H.D.K. users also swap scripts with each
other and modify the work of others.
But the hacking
kit works only with Canon cameras, one of the most popular brands. Apparently,
no such extensive project exists for hacking the software that runs Nikon, Sony, Panasonic or
other popular cameras.
The Canon
hack kit is good at setting up a camera to perform simple, repetitive tasks.
Julien
Quénard, an amateur photographer and bird watcher in Arrest, France, programmed
his Canon PowerShot A540 to constantly watch for birds,
modifying a motion-detection script originally written by a developer who referred
to himself among fellow camera hackers only as Fudgey. When the birds move into
the frame, the camera quickly focuses and then takes a sequence of four
pictures. He keeps the camera pointed at the bird feeder, but he has also found
that the redstarts and flycatchers like one particular section of his garden.
Mr. Quénard’s version uses the fastest shutter speed possible because the birds
move quickly, and uses macro mode for close focus.
The
camera’s new software leaves some tasks for him, however. "Each time, there are
a few good pictures and hundreds for the trash," he said. "I also need to crop
most pictures for better framing."
The
C.H.D.K. developers pool their resources at chdk.wikia.com, a Web
site that collects software contributions and shares the packages with other
users. Any photographer can download software files free under an open-source
license and copy it onto a flash memory card that normally holds photographs.
The site offers a "C.H.D.K. for Dummies" page with step-by-step
instructions for loading the software into the camera. The C.H.D.K. software
loads itself into the camera by taking advantage of the updating mechanism
normally used by the manufacturer to install new software with bug fixes or new
features. When a Canon camera is first turned on, the camera scans the flash
memory card for updates to the camera’s software, often called firmware. The
C.H.D.K. software is made to be temporary, though, and it can be removed by
turning off the camera and deleting these files from the flash card. The
C.H.D.K. Web site warns that something may go wrong in the process, potentially
voiding the warranty, but several developers say there are no documented cases
that it has ever happened.
Canon did
not want to comment directly upon the C.H.D.K. project or whether it could harm
the camera, saying only that untested software might "damage Canon equipment."
Several
contributors to the C.H.D.K. project suggest that many employees at Canon
quietly support the project, either because they think it is cool or they guess
that it will sell more cameras. Other programmers say they think Canon may lose
some sales of more expensive models to users who can use the C.H.D.K. to add
these features to the lower-priced cameras. But while C.H.D.K. can add some
advanced features, it can not change the lens or increase the size of the
sensor, the two factors that most influence a photograph’s quality.
"A good
lens and a good sensor can’t be emulated by software," says Francesco Bonomi, a
programmer who works near Florence, Italy.
Mr.
Bonomi, who experiments with taking photographs when there is very little
light, has been rethinking the traditional solution of leaving the shutter open
longer. Estimating how long to leave the shutter open is hard, so many
photographers take a wide range of pictures, exposing the sensor for different
amounts of time, a process often called "bracketing."
"I don’t
do actual bracketing." Mr. Bonomi said. "That means five to seven exposures.
What I have done is a few hundreds of exposures that are kind of short and then
do a virtual bracketing. If I have 512 photos, each one that is two seconds,
then I can add them up and get a virtual exposure of 1,024 seconds."
Splitting
the long exposure into hundreds of smaller ones avoids the problems that might
occur when a car drives by and lights up a dark scene. Mr. Bonomi just discards
the atypical images when adding together the results of all the short images.
But
splitting the image can conflict with the way many point-and-shoot cameras
store images in a compressed format known as JPEG. The compression algorithm
saves space by omitting detail, which introduced errors into an application
like Mr. Bonomi’s.
The
C.H.D.K. solves this problem by reprogramming the camera to store all
information without any compression in the raw format.
Mr.
Bonomi also puts his Canon SD1100 on balloons to take high-altitude pictures of
Italy. He is rewriting the software that measures the light available to
improve the exposure of his pictures. His version will average the 100 or so
measurements taken as the camera swings around under the balloon.
Rewriting
this software requires careful attention to detail, he said.
"It’s a
program that must run for two or three hours, making some critical decisions on
its own. It can’t crash," he said.
Crash? He
was using programmers’ slang, he said to describe when the camera locks up because
of a software error.
"If it
crashes into the ground, that’s also bad," he said.
But that is easier to
handle with a bit of padding.
A version of this article appeared in print on
May 27, 2010, on page B8 of the New York edition.
http://www.nytimes.com/2010/05/27/technology/personaltech/27basics.html?ref=technology