This is a read-only archive. Find the latest Linux articles, documentation, and answers at the new!

Feature: Tools & Utilities

How to give your low-end Canon digital camera RAW support

By Nathan Willis on September 10, 2007 (9:00:00 AM)

Share    Print    Comments   

If you have a point-and-click digital camera made by Canon, you may be able to turn on all sorts of features usually reserved for more expensive SLRs. That includes live histograms, depth-of-field calculation, under and overexposure highlighting, and -- best of all -- shooting your pictures in RAW. The secret is CHDK, an enhanced, free software replacement firmware.

It is not clear what CHDK developer Andre Gratchev intends the initials CHDK to stand for, but the user community has speculated that it means Canon Hacker's Development Kit. In any event, you don't have to be a hacker to use CHDK; it is as close to a plug-and-play camera enhancement as you will find.

CHDK works because many of Canon's recent digital cameras are based on the same DIGIC II chip. To see if your camera is supported, review the list in the CHDK FAQ. If you have a supported model, the FAQ provides step-by-step instructions for getting the correct firmware and loading it onto the camera. Although all of the supported cameras use the DIGIC II processor, each model is different, which required the CHDK developers to dump the factory firmware and do some reverse-engineering.

Let's walk through the steps required to get CHDK rolling on the PowerShot S2 IS. And don't worry -- unlike replacement firmware customization on Wi-Fi routers and some other hardware devices, this is all non-destructive and highly unlikely to damage your camera. Nevertheless, if you are under warranty or are prone to accidents, proceed at your own risk.

Prep and load

The first step is to determine exactly which firmware is already on your camera. Canon makes minor adjustments to its cameras' firmware over the course their production life, but except in rare cases it does not issue firmware updates that you can download and apply at home. That means if your camera uses firmware numbered 1.00C, you probably cannot upgrade it to firmware 1.00D yourself, and you must be sure your download the 1.00C version of CHDK.

To discover your camera's firmware version, first create an empty file named ver.req on the camera's flash memory card. On Linux you can do this with the touch command. Put the memory card into your PC's card reader, mount it as you would any removable storage, and type the touch command from the shell. In my case, GNOME detected and automounted the card as /media/CANON_DC, so I typed touch /media/CANON_DC/ver.req.

Unmount the card and put it back into the camera. Turn the camera on in Play mode (i.e., not camera or Rec mode). Hold down the Set button on your camera and press the Display button. The firmware version will appear on the LCD viewfinder, along with some other fun facts like your camera's build date.

Now that you know which firmware your camera has, you can download the appropriate CHDK replacement. The latest builds should be at Gratchev's site, but check the CHDK Web site to make sure.

My S2 IS uses 1.00E firmware, so I downloaded, the newest version for my camera and firmware combo. If you're really adventurous, you can also grab the source code and compile it yourself, but I wouldn't recommend starting out that way.

The .zip archive contains two binaries, Diskboot.bin and PS.fir. Put the memory card from your camera back into your computer's card reader, then copy both of these files onto the card. Put the memory card back into the camera, turn it on in Play mode, and press the Menu button. Down at the bottom of the first menu you'll see a new entry labeled Firm Update. Click on it, click OK to confirm, and the camera will reboot into the new CHDK firmware. When it does, the display will pop up a splash screen indicating the version of CHDK loaded.

If the camera doesn't boot (which can happen if you accidentally download the wrong CHDK firmware), all you have to do is turn it off and turn it back on again. It will restart using the original firmware.

Fun with firmware

Now you are ready to explore CHDK's features. To access the new features, press the <ALT> button. There is no physical button labelled <ALT> on any of these cameras; it is a "virtual" label used in the CHDK documentation because the physical button used varies between camera models. For A-series cameras, the Direct Print button serves as <ALT>. For the S2 IS and S3 IS, the Shortcut button serves as <ALT> by default, but you can change this in the CHDK settings. In both cases, the button chosen as <ALT> is one that is normally unused during picture-taking, so remapping it to this new function does not rob you of any of your camera's original features.

To explore the possibilities, press <ALT> and then press the Menu button. This will bring up CHDK's well-organized feature menu. You navigate through it with the camera's direction arrows, just like in the factory firmware. Once you have made changes, press Menu again and CHDK will save them to a preferences file on the memory card.

When you are shooting, <ALT> mode gives you quick access to toggle special features on or off. Normally you will want to leave <ALT> mode before shooting, so after making changes in the CHDK menu, be sure you press <ALT> again. While you are in <ALT> mode, the word <ALT> will appear on the viewfinder, so it is not difficult to tell which mode you are in, it's just easy to forget.

The project's wiki has one (very long) page outlining all of CHDK's additions and enhancements. It is worth reading in its entirety, but for brevity's sake I'll describe the more prominent ones.

CHDK heads-up displays: live histogram and custom info

An important usability enhancement is all of the additional info CHDK can display in the viewfinder. You can turn on a histogram that displays live brightness data for the scene, updated continuously as long as you hold down the shutter button halfway (to the auto-focus position). You can also activate what CHDK calls Zebra mode -- areas in the scene that are outside the exposure range will blink black or white: black for areas that are underexposed, and white for areas that are overexposed.

You can also add to the viewfinder numeric displays such as the auto-focus distance and the depth of field. On the non-photographic side, you can add a battery charge meter and clock. If all of that sounds a little crowded, you can rearrange the positioning of all of these elements to your liking.

Working with RAW

The aforementioned shooting aids all fall into the "tools" category. A far more substantial feature of CHDK is the ability to save your images to the camera's memory card in RAW format, instead of as JPEG files.

Enabling RAW shooting mode is as simple as checking the Save RAW option in CDHK's menus. Additionally, you can toggle noise reduction, select a special filename prefix for your RAW images, and choose whether to save them in the same directory as JPEGs, or on their own. You can even enable a special shooting mode in which shooting continuous shots will save the first shot as RAW and the subsequent frames as JPEG, thereby shortening the lag between successive frames.

As any RAW shooter knows, though, not all RAW files are created equal. Camera manufacturers keep the specifics of their formats secret and proprietary, and change the details between different camera models. So even if my S2 IS and an A610 both produce a RAW file with the .CRW extension, they will be different on the inside.

Fortunately, developer Dave Coffin has added support for most in not all of the CHDK-compatible cameras to his ubiquitous dcraw RAW converter. Linux users can process their RAW photos by grabbing the latest builds of UFRaw, RawTherapee, or LightZone.

Alternately, you can use a recent version of dcraw and convert the files to another format. The CHDK wiki recommends the Adobe Digital Negative (DNG) format for this, since unlike converting to an output format like TIFF, converting to DNG will preserve the RAW data as-is, readable by almost any image editing application.

Even though smaller cameras like the S2 IS can't compete with SLRs in terms of image quality, shooting RAW is still to your advantage. The sensors in these cameras are capable of capturing greater color depth than their default 8-bit JPEG file output preserves. And as one CHDK user discovered, the factory firmware crops margins off the sensor borders when saving to JPEG, so the RAW file is actually bigger, too.

Intermediate and advanced fun with firmware

There is even more to CHDK. It includes some non-photography-related utilities such as a file browser to examine the contents of your memory card, a text file reader (which I suppose could be photography-related if you were to include notes or shot lists), a perpetual calendar, and some simple games.

If you decide that you like CHDK enough that you prefer shooting with it to shooting with the factory firmware, there is a procedure that allows you to autoload CHDK every time, instead of following the Firm Update / reboot process. There are two minor caveats with the procedure, however..

First, the auto-load feature may not work with memory cards larger than 2GB in size. Second, you have to start the camera in Play mode first, then switch to Rec mode to begin shooting. That's not difficult to do, but it could cost you a few seconds of precious shooting time while someone else snaps that million-dollar UFO pic.

When you get comfortable with CHDK, you can check out user-supplied scripts. CHDK's scripting environment uses a simple BASIC-like language that lets you write your own scripts to automate camera functions -- but not to create whole new features for the camera. User-contributed scripts are available on the CHDK wiki, and implement interesting functions like HDR stacking, focus bracketing, time-lapse movies, and lightning photography.

Final shot

I picked up my S2 IS to use as a lightweight, carry-anywhere camera -- useful for when I needed a shot but didn't have my SLR handy. Even though I'm happy with its optics and portability, its lack of RAW power and manual control always made it a second-class citizen. Consequently, I found myself leaving it at home more and more frequently.

Loading CHDK onto it almost makes the S2 IS feel like a different camera. It's still not an SLR, but the extra heads-up features help me compose better shots. And my perfectionist side likes knowing that the image sensor is taking 10-bit-per-channel pictures and the camera is not truncating them to 8-bit JPEGs before it lets me have them.

Now if only CHDK could do something to keep that flimsy lens cap from falling off....

Share    Print    Comments   


on How to give your low-end Canon digital camera RAW support

Note: Comments are owned by the poster. We are not responsible for their content.

How to give your low-end Canon digital camera RAW support

Posted by: Anonymous [ip:] on September 10, 2007 11:39 AM
If anyone can hack this to support a Canon ixus 500 I'll buy them a cyber-pint.


How to give your low-end Canon digital camera RAW support

Posted by: Anonymous [ip:] on September 10, 2007 04:24 PM
This is really cool. I just wish I my canon was supported. I would love to take RAW shots on my point and shoot.


great article!

Posted by: Anonymous [ip:] on September 10, 2007 10:45 PM
Thanks, this is very cool. I'm going to give it a try on my own S2!


How to give your low-end Canon digital camera RAW support

Posted by: Anonymous [ip:] on September 11, 2007 02:35 AM
Great article! I have an S2 IS and am playing with this now. =) I used mine to take some eclipse shot in the recent lunar eclipse, adn was really wishing I knew more of how to use it, and how to get it to take raw shots I could then fiddle with on my own, instead of as the camera thinks is best. Thanks!


Take control of your lens cap!

Posted by: Anonymous [ip:] on September 11, 2007 02:29 PM

S2 IS does have manual controls

Posted by: Anonymous [ip:] on September 11, 2007 05:22 PM
This sounds very cool. Thanks for the article!

One question, though: why do you say the S2 IS doesn't have manual controls? I've had one for about 18 months, and I learned how to use shutter speed, aperture, and ISO on it before moving up to my SLR. In fact, I don't even know how to use the various other modes like portrait or night snapshot. Granted, they're not as easy to use, but they're there.


Thanks and lens cap solution

Posted by: Anonymous [ip:] on September 11, 2007 06:08 PM

Thank you very much for the tip. I'm glad that my S3 is supported and I'm enjoying new bunch of options.

Now, the lens cap. I've been able to solve the problem by purchasing filter adaptor and a new lens cap that fits the adaptor/filters. Using a simple UV filter, I got an extra lens protection and I don't have to suffer from falling lens cap problem. The only drawback is that it's a little expensive solution if you want to solve just this problem with it. Oh, and it makes the camera much less "compact". Nonetheless, works like charm.



How to give your low-end Canon digital camera RAW support

Posted by: Anonymous [ip:] on September 11, 2007 11:23 PM
This is great! I rarely use my S2 anymore because of lack of RAW support. Now, if they could create a build for the A410 I would be set!


Canon Powershot A75

Posted by: Anonymous [ip:] on September 14, 2007 07:16 AM
Would this work for my Canon Powershot A75?


go to the site

Posted by: Anonymous [ip:] on September 14, 2007 03:15 PM
and look at the camera info ... there's a bunch of logos; does one
say "Digic II"? -- no, it says "Digic". The S3, for example has
a "Digic II" logo; the A75 does not. Nor does the A80 (curses!)


What about Cameras with Digic III chips?

Posted by: Anonymous [ip:] on September 20, 2007 03:14 PM
I have recently bought a PowerShot A720 IS... Will there be raw possibilities newer cameras like this one?


Re: What about Cameras with Digic III chips?-Just got one S5 IS (also DIGIC III).Looking for new CHD

Posted by: jgl701 on October 07, 2007 07:40 AM
Looking for new CHDK.


Re(1): What about Cameras with Digic III chips?-Just got one S5 IS (also DIGIC III).Looking for new

Posted by: Anonymous [ip:] on October 23, 2007 11:55 AM
Yup! I am looking for CHDK supporting the latest S5 IS model.
Pls let us know as I am sure there are many S5 IS users who would like this feature!


SD1000 : CHDK available for DIGIC III?

Posted by: Anonymous [ip:] on September 21, 2007 06:44 PM
If there is a CHDK available for DIGIC III, can someone send me the link to thanks! I think other people are looking for this too.


Just got one S5 IS (also DIGIC III), Looking for new version of CHDK.

Posted by: jgl701 on October 07, 2007 07:41 AM
Just got one S5 IS (also DIGIC III), Looking for new version of CHDK.


How to give your low-end Canon digital camera RAW support

Posted by: Anonymous [ip:] on October 08, 2007 09:35 AM
i have been trying to do this with my s2 IS and cannot even get it to read into a ver.req file... none of your steps are working... help


How to give your low-end Canon digital camera RAW support

Posted by: Anonymous [ip:] on December 07, 2007 05:00 AM
I have A540 with firmware 1.00A. I hope somebody can make a firmware hacked for it. I've read it is *possible* to use CHDK on it, but until now I haven't found one. :(


How to give your low-end Canon digital camera RAW support

Posted by: Anonymous [ip:] on December 22, 2007 08:09 AM
Should be very nice if this would work on my 850 IS (with DIGIC III). Is there a new version in plan which supports the 850 IS?


kavak yelleri

Posted by: Anonymous [ip:] on February 15, 2008 08:38 PM

<a href="" target="_blank" title="kavak yelleri">Kavak Yelleri</a>


This story has been archived. Comments can no longer be posted.

Tableless layout Validate XHTML 1.0 Strict Validate CSS Powered by Xaraya