Follow Slashdot stories on Twitter


Forgot your password?
Hardware Hacking Build Technology

Hacking Canon Point-and-Shoot Cameras 242

Pig Hogger writes "If you're stuck with a cheap Canon point-and-shoot camera and have feature envy over the neighbor's sophisticated latest model, fret not! According to this LifeHacker article, the CHDK project allows nearly complete programmatic control of cheap Canon point-and-shoot cameras, enabling users to add features, up to and including games and BASIC scripting."
This discussion has been archived. No new comments can be posted.

Hacking Canon Point-and-Shoot Cameras

Comments Filter:
  • Re:Pointless (Score:5, Informative)

    by J-1000 ( 869558 ) on Tuesday May 06, 2008 @05:08PM (#23317264)
    It's for more than that of course. It allows you to enable certain camera functions that do not exist in the shipping firmware, like RAW mode.
  • by corsec67 ( 627446 ) on Tuesday May 06, 2008 @05:23PM (#23317458) Homepage Journal

    Bonus props if you can get a live histogram in the viewfinder...

    Um, changing the firmware isn't going to put a LCD screen on the mirror. Apparently you haven't grasped how a SLR [] works.

    I have needed a faster shutter speed than I was able to get.

    The firmware probably isn't going to be able to get the shutter to go any faster reliably. What you need to use is a ND filter if you like wide apertures.

    Certainly the scripting stuff could be used in a SLR.
  • by mog007 ( 677810 ) <> on Tuesday May 06, 2008 @05:31PM (#23317528)
    Later revisions of 54G routers had less memory, and slower processors. Such a gimped amount of memory it took a long time to get a build of Linux that would fit.
  • Re:Ease of use... (Score:5, Informative)

    by dfn_deux ( 535506 ) <> on Tuesday May 06, 2008 @05:31PM (#23317536) Homepage
    There is no risk of "screwing up" your camera, the hack loads the "firmware" into volatile ram in such a way that simply deleting the file from your mem card will revert your camera to the original state.
  • by Ford Prefect ( 8777 ) on Tuesday May 06, 2008 @05:32PM (#23317554) Homepage

    Um, changing the firmware isn't going to put a LCD screen on the mirror. Apparently you haven't grasped how a SLR [] works.

    I think the 450D has a live preview feature - so not exactly through the viewfinder, but a live histogram would be a funky addition.

    Assuming it doesn't have it already - I'm happy with my old 350D. ;-)

  • Not really (Score:3, Informative)

    by junglee_iitk ( 651040 ) * on Tuesday May 06, 2008 @05:35PM (#23317612)
    I tried it with my S2 IS. They really do a good job at maintaining the "soft" firmware.

    Although, for RAW images, cheap point and shoot cameras don't have physical build, and lack everything that makes RAW images special. Taking RAW images with my camera was akin to storing 1 MB JPEG image into 3 MB RAW format.
  • by lazyforker ( 957705 ) on Tuesday May 06, 2008 @05:36PM (#23317630) also mentioned this stuff recently. I tried it - awesome.

    One of the coolest features is that at any time you can restore your camera to default settings just by turning it off - no permanent flashing of BIOS/firmware!
  • by Anonymous Coward on Tuesday May 06, 2008 @05:40PM (#23317670)
    Hardhack, by definition, is a hardware hack. That would mean, for instance, adding an MCU to the board to gain extra functionality. This is a firmware change and thus is a software hack. What lotus flower are you people eating?

    Oh wait, people on slashdot are just mindless and stupid and know the difference but don't bother spending the 500us to make the distinction. I see.

    (Of course, I will be modded down, but at least I get the satisfaction of wasting a modpoint.)
  • by corsec67 ( 627446 ) on Tuesday May 06, 2008 @05:43PM (#23317726) Homepage Journal

    the shutter speed is limited to the shutter servo - they put settings so that it will work without prodcution tolerances.. while it might be posiable to make it faster it wouldn't be reliable

    Actually, don't the shutter blades always fall at the same speed? Their speed is the flash sync, the fastest speed where the whole film is exposed at a single point in time, right?

    Then to set the 'shutter speed', the time between the first shutter blade and the second shutter blade is changed.

    At least, that is how Focal Plane shutters [] work. Leaf shutters are different.
  • by Anonymous Coward on Tuesday May 06, 2008 @05:53PM (#23317834)
    Among things, most people use CHDK for one or more of:

    • RAW capture in cameras that don't normally support it (this one is huge)
    • Much shorter, or longer exposure times than supported by the camera's firmware (see this page [] for high-speed examples)
    • Zebra striping mode (highlights over/under exposed areas in real-time)
    • Motion detection (which some folks have allegedly used to successfully take lightning photos)
    • Adjustable video bitrate
    • More adjustable ISO
    • DOF calculator
    • Hot pixel removal
    • Adjustable grid
    • Real-time histogram for cameras without
    • Detailed battery life meter
    • etc.
  • Re:Ease of use... (Score:5, Informative)

    by Cruciform ( 42896 ) on Tuesday May 06, 2008 @05:54PM (#23317838) Homepage
    What exactly was hard about the instructions?
    When I first found out about CHDK I had it running on my camera *3 minutes* after the download completed.

    All you do is:
    1) copy the files to your flash card
    2) Power up the camera in playback mode while holding the menu button to add the firmware update option to the menu. This is something you should already know how to do from the cameras manual!
    3) Select the update.

    Once the files are on the flash card you can repeat this process at any time in under 15 seconds. If you want to use the stock firmware then you just don't run the update.

    The custom firmware has all kinds of neat features. If you like making HDR pics, you can use available scripts or write your own to bracket the exposures. My Powershot A620 now has the ability to shoot RAW thanks to CHDK.

    Some builds even incorporate face detection and motion detection. Screw webcams, how about having a 7 megapixel camera capturing what's happening outside your window.

    Time lapse photography is now a cinch, as are all kinds of things that the stock camera doesn't do.

    I never found any of the features to be all that hackerish. They don't document using a histogram, sure... but if you're downloading a firmware for the use of a histogram, you probably already know what one is!
  • Re:Ease of use... (Score:5, Informative)

    by neonfrog ( 442362 ) on Tuesday May 06, 2008 @05:58PM (#23317876)
    The risk of screwing up your camera comes from potentially feeding it a parameter outside of it's safety zone.

    For instance what if there were a RAM mode in the hacked firmware for firing the flash at a rate faster than the camera's default firmware would allow. You try it for that super cool skateboard picture and wonder why your flash Fresnel is brown and smoking after the fact. Granted the caps shouldn't be able to do that, but what if?

    Or you try to drive the aperture 1 click past its physical limit? Do you know if the camera has limit switches or is relying on firmware pointing to known values in RAM (pulled from EEPROM at boot) that define the scope of aperture values to control that motor? Maybe it can handle a few slams at the end of travel, but what if you keep doing it by mistake?

    Or you use a mode to leave the LCD backlight on while the flash caps recharge (normally the LCD backlight is off) and you fry the power supply in the camera because you sourced too much current?

    Or you use a mode to drive the lens into the extended position, but somehow the hacked firmware ignores the limit switch for the little lens cover door and tries to run it at the same time? Scraaaaape.....

    Don't get me wrong, this looks freakin' cool! But to presume there is zero possibility of damage seem naive to me.
  • by jimicus ( 737525 ) on Tuesday May 06, 2008 @06:09PM (#23317992)
    Take a look at the list. There's a lot of cameras it supports past and present; I'd suggest you look around ebay.
  • Re:Not really (Score:3, Informative)

    by EvanED ( 569694 ) <evaned@gmail. c o m> on Tuesday May 06, 2008 @06:14PM (#23318054)
    Although, for RAW images, cheap point and shoot cameras don't have physical build, and lack everything that makes RAW images special. Taking RAW images with my camera was akin to storing 1 MB JPEG image into 3 MB RAW format.

    RAW images should give you the ability to white-balance them after the shot. (You at least can with the RAW images from my DSLR.)

    That alone is worth the price of admission (i.e. a larger memory card) IMHO.
  • by doti ( 966971 ) on Tuesday May 06, 2008 @06:17PM (#23318094) Homepage
    They are already doing that, e.g. encrypting the firmware in the 350D model. []
  • Re:Take RAW Photos (Score:3, Informative)

    by mikael ( 484 ) on Tuesday May 06, 2008 @06:22PM (#23318142)
    There's an open source project (Dcraw [] which aims to solve this problem.

    The source code file can be found at this file []
  • by Aggrajag ( 716041 ) on Tuesday May 06, 2008 @06:25PM (#23318176)
    I am currently porting CHDK to A430 which cost me around $100 when I bought it about a year ago.
  • by Xabraxas ( 654195 ) on Tuesday May 06, 2008 @06:26PM (#23318188)
    Nope. It runs VxWorks, at least that is what the firmware dump from my Canon indicates.
  • by tlhIngan ( 30335 ) <> on Tuesday May 06, 2008 @06:31PM (#23318228)

    That always puzzles me - a consumer camera like a Nikon Coolpix allows you to see the final image through the LCD (even with zoom), while Digital SLR's, costing several thousands of pounds always switch the LCD off when a picture is about to be taken.

    Because it's physically impossible on an SLR. In an SLR, you have the lens, that then is followed by a mirror. The mirror, in the "down" position, reflects the light from the lens through the prism viewfinder and then to your eye.

    When you click the shutter, the mirror flips up (viewfinder goes dark), exposing the shutter which then opens and shuts the right amount of time the actual camera sensor.

    That's not to say it's not possible to say, add a little cameraphone like sensor and offer a live preview (several dSLRs do this now), but historically, it wasn't possible. The light is either going to the main camera sensor, or the viewfinder. A small amount is actually reflected *down* for autofocus, though.

    Though, as anyone knows, holding your camera at arm's length (so you can use the LCD as a viewfinder) sucks for camera shake. And most camera LCDs are of QVGA or lower resolution, so you miss out on all the nice little details youc an see through a real optical viewfinder like that on a dSLR...
  • by colinnwn ( 677715 ) on Tuesday May 06, 2008 @06:39PM (#23318308)
    I was OK with Linksys reducing the memory footprint, especially since they introduced the 54GL.

    I was not enthused they forsake open source firmware (busybox) for closed source VxWorks, and then that Linksys or VxWorks put some checksums in their upload routines that tried to disallow altered firmware.

    The fact the openWRT people finally overcame the checksums and shoehorned busybox into the gimped 45Gs (while retaining more features than VxWorks) shows it was technically possible. They were just taking the comfortable path rather than upholding the hacker roots of the 54G which made it such a success.
  • Re:Pointless (Score:2, Informative)

    by xtracto ( 837672 ) * on Tuesday May 06, 2008 @06:53PM (#23318442) Journal
    It is really cool. I just read this and installed it on my PowerShot A530. I ran some tests with a DOFStacker + CombineZM and shoot some RAW pics.

    IMHO it has some really nice features so that we casual photographers can get more from the cameras.

    Of course I won't be taking all my pictures in RAW but it is nice to have some of those features. Oh! and the optical-zoom while in video is a really useful and simple feature.

    There are tons of other functions that *really* make CHDK shine...
  • Re:Take RAW Photos (Score:3, Informative)

    by LinuxGeek ( 6139 ) * <> on Tuesday May 06, 2008 @07:04PM (#23318536)
    The actual process is much more involved [] than just figuring out the order of the RGB info.
  • by mrchaotica ( 681592 ) * on Tuesday May 06, 2008 @07:14PM (#23318624)

    How did Linksys cripple the 54G? IIRC, they came out with the 54GL variant to keep the hacker crowd happy.

    No, they renamed the original G to GL, jacked the price up $20, then came out with a new, shitty router that they named G for the same price that the better hardware had been before. And all this while hardware costs should have been going down anyway (as is the general trend in technology).

    (Have you got a hint abut why people are pissed off yet?)

  • by neonfrog ( 442362 ) on Tuesday May 06, 2008 @07:34PM (#23318804)
    You are mostly correct.

    On Canon SLRs the shutter blades travel as you describe. As the shutter speed gets faster, the delay between when the first/front curtain fires and the second/rear curtain fires gets shorter and shorter. At shutter speeds faster than X-sync (fastest shutter speed usable with flash), both curtains can be moving at the same time leaving a narrow slit between them. The width of that moving slit is effectively the shutter speed. The curtains always move at the same speed, just the delay between when they "fire" is altered.

    On some more recent Nikons, the same is true up to 1/250, but then the imager becomes the gate. At shutter speeds faster than X-sync, the shutters stay open as if they were set to 1/250 even if you are at 1/8000. The imager simply captures for less time.

    And on some Nikon cameras LCD shutters are being used.

    It is a changing world for good old focal plane shutters.

  • Re:Ease of use... (Score:3, Informative)

    by cjsnell ( 5825 ) on Tuesday May 06, 2008 @07:56PM (#23318972) Journal
    It's even easier on my A720 IS. All I had to do was to flip a few bits [] on my SD card with a hex editor and flip the read-only switch on the card and the camera automatically boots to CHDK. Don't want CHDK? Simply flip the SD card back to read/write. The camera ignores a read-only card and happily writes photos to it when it's locked.
  • Re:Pointless (Score:5, Informative)

    by goatpunch ( 668594 ) on Tuesday May 06, 2008 @08:00PM (#23318984)
    RAW gives you more image information, as you haven't gone through a lossy RAW->JPEG conversion. Whether this is to correct an under/over-exposed picture (or both*), or to compensate for an incorrect (or impossible**) white balance setting.

    You're right, a bigger sensor and lens will give you a better picture. But for a given maximum camera size, RAW will give you the potential*** for better images than JPEG. Perfect for an undercover paparazzo who needs to blow up that discreet underexposed celebrity shot to sell to US Magazine.

    A decent analogy is that with JPEG you've thrown away the 'negative', and are left with only a print of the image, throwing away the rest of the information contained in the negative. If you really care about the image, or are going to spend hours working with it in photoshop, wouldn't you rather be working with an image taken from the negative, rather than the print?

    * example of an under- and over- exposed picture: a person wearing a hat on a sunny day. The outside of the cap can be overexposed, while their face is underexposed. As RAW stores the image with a higher colour bit depth, you've got a chance of recovering the over and under exposed area.

    ** example of 'impossible' white balance: a room lit by candlelight, which has a window with an overcast sky outside. Either the room will look orange, or the window will look blue, or both- there's no way to make both areas of the picture look correct with one white balance setting. Changing the white balance of one area of the JPEG that radically will throw away masses of information, and look terrible. With RAW, you can render the picture twice with two different white balance values, one for the overcast sky, and one for the candle, and merge the two images together.

    *** With a perfectly exposed picture that has the correct colour depth, the only real advantage of RAW is that you avoid the JPEG compression, but with these small sensors you're probably only going to see noise there instead of the compression, so it won't make a lot of difference.
  • by apt-get moo ( 988257 ) on Tuesday May 06, 2008 @08:41PM (#23319246)
    A good firmware won't help you in any way if you are limited by the specs of your camera. You should go for the best combination of a good (i.e. not too small) CCD and the zoom coverage you need. The G7 and the SD870/ Ixus860 would be some good picks.
  • by tsu doh nimh ( 609154 ) on Tuesday May 06, 2008 @09:02PM (#23319360)

    I would tell anyone who'd listen that if you own one of these cheapish but otherwise excellent point-and-shoot cameras (mine is a Canon Powershot A510), if you're looking for a great use for it, consider putting it to use as a Web cam, or a motion detector.

    I spent quite a bit of time researching this project, and am not affiliated with either company I mention here, nor do I stand to gain from mentioning them. I only cite their names here b/c I was looking for a cheap way to get good quality, auto-recorded video and photo shots of hummingbirds and other birds visiting our feeder, and was amazed at how easy and cheap this was given the alternatives (crappy webcams, etc).

    First step up was downloading PSremote [], which works with most brands of point and shoots, but most particularly Cannon. It lets you control the camera entirely, from the zoom to the shutter speed and exposure -- from the computer, assuming it's connected to the PC using the supplied cable.

    Add to that setup Webcam Zone Trigger [], which interacts with that software to let you define "hotspots" and the level of motion detection that should trigger recording in those spots, and you now have a new life for that old camera you don't use anymore. Total cost: $100.

  • Re:Ease of use... (Score:1, Informative)

    by Anonymous Coward on Wednesday May 07, 2008 @12:53AM (#23320732)
    Fi you check the CHDK FAQ you'll find the official Canon answer to CHDK: it does not violate your warranty, because it does not make any actual/permanent modification to the camera firmware (CHDK resides in the external flash memory, just remove it and it will be gone!)
  • by shellbeach ( 610559 ) on Wednesday May 07, 2008 @12:54AM (#23320740)

    Hardhack, by definition, is a hardware hack. That would mean, for instance, adding an MCU to the board to gain extra functionality. This is a firmware change and thus is a software hack. What lotus flower are you people eating?
    Actually, it's not a firmware hack, either. Basically it works as follows:

    When you upgrade firmware in a Canon camera, there is scope to run an application before the firmware upgrade. What CHDK does is trigger the upgrade process, but doesn't upgrade the firmware -- it just uses the firmware upgrade routine to run the CHDK code on top of the firmware. The camera still works, and the CHDK code has access to all the camera variables, allowing you to do pretty much anything you want. But the underlying firmware remains unchanged (and thus your warranty isn't void).

    It's all rather neat, and the CHDK code is easy to hack around with (I've done so in the past).
  • Re:Pointless (Score:5, Informative)

    by shellbeach ( 610559 ) on Wednesday May 07, 2008 @01:05AM (#23320796)

    which is mostly useless on a camera with a sensor that small.

    You don't understand what RAW is for, do you?
    Actually, he/she does. I use CHDK, and I can tell you that there's very little extra info in those 10-bit raw files (that's all you get from the Canon P&S line). Remember that a lot of that extra room already goes in whitebalance correction.

    You *can* get a bit more non-colour information out of the highlights if you really push it, but really ... I've just gone back to shooting jpegs, mostly. 10-bit RAW files aren't pretty.

    That said, it's still nice to have the capability, but in the real world it's just not that useful most of the time. What *is* really nice about CHDK are the live histogram capabilities -- the live merged RGB histo is outstanding in getting the exposure right (and I don't know of any other P&S camera that provides this capability).
  • Re:Pointless (Score:4, Informative)

    by commanderfoxtrot ( 115784 ) on Wednesday May 07, 2008 @10:20AM (#23323566) Homepage

    RAW gives you more image information, as you haven't gone through a lossy RAW->JPEG conversion. Whether this is to correct an under/over-exposed picture (or both*), or to compensate for an incorrect (or impossible**) white balance setting.
    You're correct, but people may, reading it, be under the impression the problem is the JPEG compression.

    RAW gives you the full bits per pixel available. This can be up to 14 in the recent DSLRs. Let's assume a P&S can give you 10 bits/pixel.

    That's two more stops than a standard 8-bit JPEG, even at "maximum quality".

    JPEG compression artifacts aren't the real problem - it's the colour depth available in RAW.

    So shooting RAW allows you to rescue the highlights and shadows. JPEG compression artifacts are a red herring.

    Of course, if we used PNG or 16-bit capable JPEG (with full EXIF), then there wouldn't really be this problem...
  • Re:Pointless (Score:3, Informative)

    by goatpunch ( 668594 ) on Wednesday May 07, 2008 @11:47AM (#23324600)

    When you take a RAW image, the only camera settings that you have to worry about are the aperture, the shutter speed, and the ISO setting (of course you still need to focus/autofocus and point the camera in the right direction, etc.).

    The RAW image is just the data that is coming off the sensor, without any processing. The image sensor, and therefore the RAW data saved from it, can have no concept of 'white balance' - this is a shifting of the colours in the image that takes place in the image processing software, to make the finished image look more acceptable to us in most lighing conditions. A white balance setting is often stored in the EXIF data for the RAW image, but this is just used as a default setting when you open the image in your processing software, it doesn't affect the actual data.

    Like, if I shoot the same image at say 5000k and then at 8000k, then open the image in an application for RAW images and set the while balance to 6500k in both, will they contain the same data? (Because with JPEG they would of course not.)
    Yes, you're exactly right, the data on the sensor in both cases will be the same- the white balance shift that occurs during processing will not have taken place.
  • by AmericanInKiev ( 453362 ) on Wednesday May 07, 2008 @12:19PM (#23325130) Homepage
    before carping about the prefix in someone else's, you should take out the adjective from your own.

    Turns out it's not a "Firmware Change" either anymore than running a bootable linux CD under vmware on your mactop is a firmware hack.
    What it is - and this is a critical point for warranty concerns, is the ability to /temporarily/ ammend the active program for the duration of a single boot. It does not as you suggest change the firmware, which by definition is the nonvolatile program memory contained in the device. The original firmware remains safely ensconced in its usual place, it is merely substituted in whole or part with code from the boot "disk" - until the system is rebooted.

  • Re:Pointless (Score:1, Informative)

    by Anonymous Coward on Wednesday May 07, 2008 @01:19PM (#23326410)
    Yes, exposure compensation == manually overriding the automatic metering.

    When you change the ISO setting, you generally change the sensitivity of the sensor itself (like a volume control). Some cameras have a so-called expanded ISO range (some times in both ends, e.g. ISO 50 at the lower end and ISO 3200-6400 at the top end). When you select these expanded ISO settings the camera will adjust the captured data mathematically. One example is the new Nikon D3, where you can select an expanded ISO value of 25 600. What happens then is that the camera boosts captured data from its highest native ISO setting (I think for the D3 the highest native ISO is 3200 or 6400). And yeah, boosting image data like that will increase noise, but some times you need a correct exposure there and then and don't have time to fiddle with post-processing on a computer (think photo-journalists).
  • by jimicus ( 737525 ) on Thursday May 08, 2008 @07:39AM (#23335620)

    Tethered shooting? Is that some really strande way of saying that you use a cable release?
    Tethered to a PC. Most earlier Canon point & shoots could be told to take a shot by a PC connected to the USB port, but somewhere along the line Canon decided this feature should be reserved for the absolute top of the range model. I can't believe maintaining the feature in the cheaper models would have cost them any money - I think it's far more likely that they wanted to make sure that anyone who was that bothered about what Canon perceived as being a relatively advanced feature went out and bought the expensive camera, even if there was little or no photographic benefit over a cheaper model.

    Shame, really. Software-controlled shooting via a USB port allows all sorts of fun timelapse things without messing around with (usually extremely expensive) specialist hardware.

Solutions are obvious if one only has the optical power to observe them over the horizon. -- K.A. Arsdall