Enabling RAW DNG Images With CHDK

By , April 24, 2011 6:54 am

One of my favorite features of CHDK is the ability to save RAW DNG images on my Canon Powershot camera. This provides a lot of extra flexibility to edit and colour correct your photos compared to JPEGs. CHDK has recently added a new menu item that allows you to enable DNG support without the need for the old badpixel.lua script technique. I have also done some experimentation with Adobe camera profiles and CHDK DNG images.

Step 1.
Open the CHDK alt menu and navigate to the RAW parameters menu.

Select the RAW Parameters menu item.

Select the RAW Parameters menu item.

Select the Create badpixel.bin menu item.

Create badpixel.bin

Create badpixel.bin

The camera will take two images and process them to come up with a bad pixel map. It took about 35 seconds to create the file on my camera.

Be patient while the camera creates the badpixel.bin file.

Be patient while the camera creates the badpixel.bin file.

Two pictures will be taken when the badpixel.bin file is created.

Two pictures will be taken when the badpixel.bin file is created.

Badpixel.bin Created

Badpixel.bin Created

Step 2.
Enable Save RAW.

Turn on RAW file in dir with JPEG
Turn on ‘DNG” file extension
Set Bad pixel removal to Off
Turn on DNG format. (This will allow you to open the RAW DNG image right in Photoshop without any conversion.)

Enable Save RAW

Enable Save RAW

Step 3.
Capture the RAW image. You will see the text "DNG:" on the lower right corner of the camera's LCD screen when Save Raw is enabled.

Now you can capture a RAW DNG photo.

Now you can capture a RAW DNG photo.

Step 4.
Transfer the photos to your desktop computer using your usb memory card reader.

SD Memory Card Reader

SD Memory Card Reader

Step 5.
Post process the DNG formatted photos using your favorite graphics package. The DNG images work perfectly with Adobe Photoshop and Lightroom.

Now the DNG + JPEG images are stored on your memory card.

Now the DNG + JPEG images are stored on your memory card.

 

Here are DNG and JPEG sample image taken with CHDK and a Canon Powershot SD780 IS / IXUS 100:

Here is a sample CHDK RAW DNG photo.

Here is a sample CHDK RAW DNG photo.

Sample DNG Image (18 MB):

CRW_9318.DNG

Sample JPEG Image taken at the same time (1.8 MB:

IMG_9318.JPG

8 Responses to “Enabling RAW DNG Images With CHDK”

  1. sam says:

    What settings did you use to correct the Lens distortion and chromatic aberration on the SD780IS with DNG Raw.

    I have started using lightroom and wanted to know if there were presets that can be used to fix the distortion caused by using DNG with CHDK.

    Thanks for your answer.

  2. Andrew says:

    Hi Sam.

    I have just started learning how to use Adobe Lightroom. One way to create a lens distortion preset would be to do the following:

    Print off a bold grid or checker pattern on a piece of paper and photograph it using your Canon SD780IS camera at the wide, medium, and telephoto zoom settings.

    Adjust the lens distortion parameters in Lightroom for the three images until the grid lines in the CHDK DNG images are straightened out without any curvature.

    Then adjust the chromatic aberration settings until any colour fringing is taken care of.

    Next save your new presets.

  3. sam says:

    Thats actually a pretty clever idea.

    Btw any resources on how to save these settings as presets?

  4. Andrew says:

    Sam,

    I created a few Adobe Lightroom presets to correct for lens
    distortion in SD780IS CHDK DNG RAW images.

    You can read about the presets here:
    http://www.andrewhazelden.com/blog/2011/09/fixing-lens-distortion-in-chdk-dng-raw-images/

  5. sam says:

    Btw if you are editing in Raw anyways, why do you save jpeg as well. I am finding that my camera slows down when I am saving jpeg alongside.

  6. Andrew says:

    It all depends on the type of scene I am shooting and how much time I have. If I'm using a tripod while shooting a fairly static scene I would probably keep the Canon JPEG as a reference.

  7. Steve says:

    Thanks for the handy information here. I just got a SX230 and installed chdk. When I created the bad pixel file it said I had 20789. Is this in the norm?

    Steve

  8. Andrew says:

    Hi Steve.

    I wouldn't worry too much about how many bad pixels are listed as long as the finished CHDK RAW / DNG photos look okay.

    Regards,
    Andrew

Leave a Reply

Note: Comments will have spelling errors corrected before they are posted. If you have a specific question please provide your email address so I can send you a direct reply.