As anyone who has lusted over the technical specifications for Canon’s new Digital Rebel XSi knows, the capabilities of the average point and shoot camera are severely limited. Using the CHDK firmware hack, the features of Canon point and shoot cameras can be significantly expanded, allowing for ultra-high speed photography, very long exposures, time lapse photography, and RAW capture. This How-To provides a guide to our experiences using the CHDK firmware, and shows just how easy it is to get more out of a point and shoot than ever thought possible.
The first step is to install the CHDK software. Our friends at Lifehacker recently ran an article covering exactly that, so we won’t bother repeating the instructions. Be sure to install the Allbest build, it has all of the nice features.
After installing, you’ll want to have the firmware autoload when you boot up your camera. To do so, open up the main CHDK menu by pressing your ALT button, then the MENU button. Scroll down to “Debug parameters”, then click on “Make card bootable…” After it is done, turn off your camera, remove the SD card, and toggle the write protect switch. When this switch is toggled, the camera will automatically boot into CHDK (you’ll still be writing to it).
Taking long exposures
Long exposure photography is appreciated for its soft, sometimes surreal images of (usually) night scenes. Many point and shoot cameras only allow exposures of 15 seconds, but with CHDK, you can take photos at up to 64 seconds.
Navigate to CHDK’s main menu and find Extra Photo Operations. In Extra Photo Operations, change the Override Shutter Speed value to the shutter speed you wish to shoot at, such as 64 seconds. Scroll down and change the Value Factor from OFF to 1.
Though the camera will not indicate the modified shutter speed, the changes will take place. Just take a picture as you normally would. Be sure to have your camera set to manual mode. Taking photos of moving things works best for long exposures: try subjects like the ocean, windy trees, and traffic. Additionally, using neutral density filters, you can even take long exposures in the day time!
Taking ultra-fast exposures
Just as you can override the shutter speed for long exposures, you can take ultra-fast exposures as well, at up to 1/100,000 of a second with some cameras. Flash will sync at up to 1/60,000 of a second, and you’ll need flash with such short exposures. We were unsure how useful or easy this would be to use, but the results surprised us: in just a few minutes we were able to capture nice looking water droplets, without a hint of motion blur.
Navigate to CHDK’s main menu and find Extra Photo Operations. In Extra Photo Operations, change the Override Shutter Speed value to the shutter speed you wish to shoot at, such as 1/16,000 of a second. Scroll down and change the Value Factor from OFF to 1. Be sure to have your camera set to manual mode.
Note that the minimum shutter speed is restricted by the aperture value you have selected in the camera’s manual settings. The wide end (lower numbers), can usually only shoot at down to 1/8000 of a second, while the narrower end (higher numbers) can shoot for the full range.
Prefocus before taking the picture, either by using manual focus mode, or by holding the shutter button halfway down. Though the camera will not indicate the modified shutter speed, it will use the short shutter speed. There are many different things that can be done with high speed photography: capture water droplets, capture explosions, or even capture a bullet leaving a gun. All of these are possible with CHDK.
The real power in CHDK comes from running user made scripts. The first script we will look at is an intervalometer, which allows you to take many photos over a period of time. We used it to easily create a time-lapse video.
Copy and paste this script into a new document, and save as ult_intrvl.bas to your computer. Then, plug in your camera’s SD card, and copy ult_intrvl.bas to /CHDK/SCRIPTS/.
To use the intervalometer, navigate to the main CHDK menu, find “Scripting parameters”, and click “Load script from file”. Find ult_intrvl.bas, and press set. Then, scroll down and adjust the script parameters: the delay until the first shot is taken, the number of shots you wish to take, the interval between each shot, and whether or not you want it to take an “endless” number of photos. Then, exit the menu, but leave your camera in ALT mode, and press the shutter button to start the script.
The video above was created by taking approximately 700 shots at 15 second intervals over 2 hours and 45 minutes. Just set your camera on a tripod or another steady surface, and start the intervalometer. Using QuickTime Pro, go to File>Open Image Sequence to convert the hundreds of separate images into a movie. For space and processing considerations, we recommend setting your camera to a low-resolution mode before starting the intervalometer.
Exposure bracketing allows you to take many pictures at slightly different exposures nearly simultaneously. You can use this to correct errors in the camera’s autoexposure, or merge exposures for HDR photography. Many higher end Canon PowerShot’s have exposure bracketing built in, but for those that don’t, CHDK has the answer.
Like with the intervalometer script, simply copy and paste this script into a new text file. Name it bracketing.bas, and place it in the /CHDK/SCRIPTS/ folder of your SD card.
Then navigate to the main CHDK menu, find “Scripting parameters”, and click “Load script from file”. Find bracketing.bas, and press set. Then, scroll down and adjust the script parameters. The step size is the difference between each image taken, in 1/3 EV steps, the correction is the EV of the middle image taken. The only slightly tricky part here is that first parameter is the (number of images – 1)/2. This means that if you want three pictures, it must be 1, five is 2, seven is 3, and so on. To run the script, exit the menu, leave the camera in alt mode, and press the shutter button.
With these different exposures, you can create HDR tone-mapped images, that show very bright and very dark regions exposed properly. For example, taking the seven different images of the lighthouse above into an HDR program such as Photomatix, optimizing settings for realism, produces this result:
You can also use HDR to produce more dramatic photos, such as this train. It is all in how you process the images.
For more information on HDR photography, Stuck In Customs has an excellent tutorial.
Taking RAW photos
RAW photos can be extremely useful to digital photographer. They enable you to extract more information from bright highlights in an image, and RAW gives the you complete control over white balance. For example, in the above photo the JPG had an incorrect white balance, which was easily corrected using the RAW image. While DSLRs offer 12 bits of data in RAWs, most point and shoot cameras can only provide 10, meaning that even with CHDK, you won’t be able to extract as much information from highlights as you could with a DSLR. Still, RAWs are very useful for having precise white balance control.
In the Raw Parameters menu, enable “Save RAW”, and adjust the other parameters as shown. Now, you can take photos as normal, and a RAW will be automatically saved with your JPG. The RAW file will take quite a bit a more space than the standard JPG, so your camera will not be able to correctly display remaining space on the SD card.
Processing RAW photos
To process your RAW photos, you’ll need to convert them to the Digital Negative format, DNG. The DNG4PS-2 software can do this for these cameras: A610, A620, A630, A640, A710 IS, S2 IS, S3 IS, A700, G7, A560, A570 IS, IXUS 700, IXUS 70, IXUS 800, A720 IS, S5 IS, IXUS 950, A650 IS, A460, SD800 IS, A530, A540. You can also process the files using UFRaw or dcraw, though that is much more difficult.
Open DNG4PS-2, then go to settings. Adjust the model settings based on how many megapixels your camera is. Next, press OK, and find the path to RAW files option. This is not the location of the file that you wish to convert, but the folder that contains the files. When you have selected the correct folder, press “Convert”.
The DNGs will be in a folder marked with today’s date, and from there, you can process them in Lightroom, Aperture, Photoshop, or whichever RAW processing software you prefer.
Adding a battery meter
Tired of have the low battery warning sneak up on you? CHDK can add a battery meter to your camera, though the configuration depends on what type of camera you have.
To enable it, go to OSD parameters in the main menu, then to Battery. Edit the parameters so that they are as they appear above, if you have a camera with 4 AA rechargeable batteries. Cameras with 2 AA rechargeable batteries should be about half of that. For other power sources, experiment to find the best value.
Writing your own scripts
CHDK uses a very simple BASIC-like language called UBASIC. It has all of the features that one would expect from any language, but there are many camera specific features.
Each script begins with a special header, that provides information and control to the user.
@param a Number of shots
@default a 10
@param b Interval (Minutes)
@default b 1
In this header, the title of the script is declared, as are two user adjustable parameters. The syntax is simple:
@title declares a title,
@param par declares the name and label of a parameter, and
@default [par] declares the default value of a parameter. Scripts can only receive input through the header, at the beginning of their execution.
To output information to the user, the
print "Num shots: ", a will print the number of shots, as inputted in the script header. Note the use of the comma to seperate text from variables. The
Standard program flow
let a = 2
for x=1 to 10
rem print even numbers
if x % a = 0 then print x
This block of code demonstrates many of the logic features of the UBASIC language. To assign values to variables, use the
let command. You can also see a
for loop and a subroutine. Note the use of the
rem command to insert comments, and the single line
if statement. UBASIC supports most standard mathematical comparisons, including
+, -, *, /, %, <, >, =, <=, >=, <> (not equal to)
, &, |, ^ (xor).
The meat of UBASIC is in its many commands for controlling the camera:
- Takes a photo
- Clicks (press and release), presses, or releases on the cameras buttons. The following are available:
up, down, left, right, set, shoot_half(depresses the shutter halfway)
, shoot_full, zoom_in, zoom_out, menu, display, print, erase, iso, flash, mf(manual focus)
, macro, video, timer.
- Waits for a button to be pressed, then continues. The timeout value is optional.
is_key x "button"
- Immediately follows a
wait_clickcommand. If the last button pressed is
"button", then the variable x is set with the value of 1. If
wait_clicktimed out, then
"no_key"is used as the button name.
- Sets the shutter speed to
val. Note that
valis not “1/1000″ or something similar, but rather an integer value. Each increase in the integer value corresponds to a 1/3 EV increase. The absolute mapping between integer values and shutter speeds varies between cameras, but tables are available here. This, and all following commands must be used with the camera in manual mode.
- Sets the shutter speed relative to the current shutter speed. Example:
set_tv_rel 0-1increases the shutter speed by 1/3 EV.
targetequal to the current shutter speed.
set_av val, set_av_rel val, get_av target
- With the same syntax as shutter speed commands, these adjust aperture settings.
set_zoom val, set_zoom_rel val, get_zoom target
- Just like
valis +/- the relative change. Zoom values range from 0 to 8 or 14 for A-series cameras, and 0 to 128 for S-series cameras.
- S-series only. Sets the zoom speed, at
x% of maximum speed.
xmay vary between 5 and 100.
set_focus x, get_focus target
x/targetis distance in millimeters.
set iso x, get iso target
x/targetis one of the following values:
0 (Auto ISO), 1 (50/80), 2 (100), 3 (200), 4 (400), 5 (800), -1 (High ISO).
Where to go from here
Try checking out the CHDK wiki, for more features then are even printed here. Finally, take photos! The most important thing that you can do to improve your photography skills is to take lots of photos.