Wednesday, June 11, 2008

Working with the Raw Files from CHDK

By default, the Powershot S5 IS does not provide raw file output functionality. Because of that, the files generated by it are very unique. Commercial software like Photoshop, Paint Shop, or Capture One, just as a few examples, can not directly open the raw files. This is because in order to open a raw file generated by a camera, the software manufacturer either receives the profile for the format of the raw files for that particular camera (each camera individually has it's own raw profile and generates a unique raw file) or in rare cases, reverse engineers the raw file to get it's profile. But, the camera has to normally provide the functionality of outputting raw files without additional components or software hacks, otherwise, those companies see no reason to include its profile in their software (not everyone uses CHDK).

There are a few ingenious people who have reverse engineered the raw file the S5 outputs by CHDK and provided a software program that will convert the output crw files to DNG. DNG or digital negative is a file format developed by Adobe systems as a more universal format for working with and storing raw files. Regardless of the camera model or make, a DNG file is always loadable by most software like, of course, most of the Adobe line of image editing software and other programs that can open DNG files. The format was intended to be more ubiquitous and standard than the files from cameras alone. Especially since every camera has its own format for its raw file regardless of manufacturer or model. This made it difficult to work with raw files from cameras and it wasn't always guaranteed that the existing software you own will open it. This prompted Adobe to develop their DNG format to convert to from the camera's raw format. But, because the S5 does not normally output raw files, Adobe won't have its file format profile and cannot convert to DNG. How do you convert it?

There is a great program called DNG4PS-2 which was developed for free to convert the crw raw files from the canon powershot line of cameras to Adobe digital negative format for use with typical photo editing software. The software can be found here;

http://dng4ps2.chat.ru/index_en.html

(Version 0.2.2 (beta as of this writing) is multilingual, any version earlier than that is Russian only)

The initial screen for DNG4PS-2 is somewhat underwhelming, but functional.

image

The Path to RAW files is a perpetually configured option in that each time you dump the pictures from your camera to your computer, there will likely be a new folder that they are stored. As a result, you'll need to configure it each time. The list below that shows the raw files it's detected and any corresponding jpg files. The S5 cannot save only jpg files, though, if you delete the jpg files through the review menu on the S5, it won't erase the corresponding crw file (it doesn't know to delete them since it normally doesn't make them), basically making the camera raw only. However, there is a benefit to having the corresponding jpg file as it is used by DNG4PS-2 as a profile for the raw file conversion effectively developing it. If the jpg is missing it will use a default profile. The DNG output directory is just where you want the resulting DNG files to be saved.

Clicking the Setting button shows the following dialog.

image

The main settings are self explanatory. The DNG files options includes options to compress the DNG file for smaller files, but I'm not sure how compatible they would be with non-Adobe software. Add metadata from jpeg file means to add and maintain any exif and ipc data contained in the jpg files. This can only be done if a corresponding jpg file is preserved when the photo was taken and copied to the same folder as the crw file when dumping the photos to your computer. Insert preview allows you to insert the jpg file as a preview to show what the contents, though not exactly the photo, since it is a copy of the jpg and not the crw, would be. You can adjust the size accordingly. Subfolder allows you to specify that the resulting DNG file be saved to a subfolder named by the date stamp from the crw file. Keep in mind that CHDK sometimes goofs up the date stamp for crw files and DNG4PS-2 may create more than one date folder as a result. Artist is just the artist name and is inserted into the exif data. Camera types allows you to specify the camera profile for each megapixel type. Regardless of the setting of the S5, the raw file wil always be an 8 megapixel file. Therefore, dropdown the list and choose the S5 for the 8 Mpx profile. Set the interface or program language to your preferred language and press okay.

When you click convert on the main dialog, the following display shows.

image

Once completed, you can work with the resulting DNG files as you wish. If you've included a preview, depending on the size, you may notice that the resulting DNG file is significantly larger than the original crw file.


Quote of the day:
Nothing is impossible. Some things are just less likely than others. - Jonathan Winters

9 comments:

Kani said...

Thanks for the post! very nice information. I have one question that you might be able to address. I have an S5 too, and I'm using CHDK and Lightroom. The problem is that the colors are shifted when I open the DNG's in Lightroom, you know what might be causing it? It seems like the auto white balance is changed.

Godot Engine said...

I haven't experienced that in Lightroom, only in PSPro. You'll have to adjust the temperature and the tint of your photograph, then. I'll try to see what I can do to help with that.

Alexandre Campagna said...

I am having the same problem here with lightroom. All DNG's colours are shifted and whitebalance is not accurate ( I stack all my DNG's with the corresponding JPGs...) there is a lot of difference in colours. Anyone found a solution?

Anonymous said...

u have to change WB to "As Shot". I also found this prob but colrs come correct after changing WB.

here r some egs, after changing WB:
http://flickr.com/photos/hym/2645472316/
http://flickr.com/photos/hym/2645450050/

Unknown said...

Is there a way to use camera profiles with CHDK converted RAW. With my NIKON D300 I can make custon calibration profiles, but with the converted RAW fron CHDK can't find out how to do it.

Anonymous said...

Hola, no se si siga funcionando este blog. Tengo un problema con el chdk de mi canon s5is, lo instale aparentemente bien pero para disparar tengo que salir del alt, si estoy con alt no me permite disparar y por lo tanto no me hace nada de lo que se puede hacer con chdk, ya no se que mas hacer, si alguien tiene una idea que me ayude!. gracias
Dejo mi mail por si se quieren contactar
kasteo98@yahoo.com.ar

digital photography expert said...

DNG or digital negative file format is a universal format and commercial software like Photoshop, Paint Shop, or Capture One can directly open the raw files. Hence more easy to edit it.

Marc said...

Nice work making this tutorial, very helpful!
Keep on going ;)

Mr Clint said...

I have researched the DNG fomat and although it is an Adobe commercial file, it is essentially an open file format. It has been offered up to ISO as a standard fomat. It is essentially a raw file within the DNG wrapper. So, it seems that when a DNG is opend by a program that can read DNG, the raw file is exposed and can be edited as nomal.

Some photographers have switched entirely to DNG as the fomat will not age like the various raw file fomats do and will.

It should be noted that there is software called DNG Profile that works in comjunction with Lightroom, allowing one to alter whit balance - especially for infrared false colour imaging.

I hope this helps.