The RAW format produced by the CHDK has some restrictions. First, CHDK’s RAW images are not equipped with EXIF data. Second, the RAW format produced by the CHDK is not understood by all RAW converters. Some simply refuse to open the image. A good choice is the program RawTherapee, which is available for the main PC platforms (Windows, Linux, Mac) on a donation basis. It’s a bit slow but delivers excellent results. Also, the free command line tool dcraw converts CHDK RAW files with excellent quality.
Newer versions of the CHDK, however, can produce RAW images that are already converted to the DNG format. Adobe Systems introduced DNG in order to bring different RAW formats (each manufacturer has at least one) under one umbrella. DNG files still contain RAW data but in a manufacturer-independent, Adobe-specific way. Some premium cameras such as Hasselblad, Leica, and Pentax use DNG as their native RAW format. With the CHDK, you can now join this exclusive club and produce DNG files directly from your camera.
Using DNG has a few advantages over the native RAW format:
- You can choose among a large variety of image editors and RAW developers that accept DNG files as input.
- DNG files produced by the CHDK do contain EXIF data.
- Bad pixels are optionally corrected. There are three options in the menu entry ALT > MENU > Raw Parameters > Bad pixel removal:
- Off. No bad pixel removal.
- Averag. Replaces the bad pixel with an average from its neighbors.
- RAWconv. The repair job is left to the PC-based RAW converter. The list of bad pixels is included in the DNG file.
Because bad pixels are optionally considered during the in-camera conversion to DNG, a file badpixel.bin is required by the CHDK. Only then will the DNG menu items work. So, before using DNG, you must execute the script badpixel.lua. This script, which is included in the CHDK distribution, will read the list of bad pixels (as determined by the manufacturer) from the camera’s firmware. To run the script, switch the camera to Recording Mode and invoke:
- Alt > FUNC/SET > Load Script from File… > TEST> BADPIXEL.LUA
- Press the shutter button. The display will go dark, and the camera will take two pictures. After 20-30 seconds, the display will reappear and the camera will wait for input. If the bad pixel test was not successful, the script will ask you to run the test again.
- Press FUNC/SET to save the file.
- Press ALT to switch back to normal mode.
- Now you can go ahead and switch to DNG (ALT > MENU > RAW Parameters > DNG Format). Or, you can use the built-in file browser to check that the file BADPIXEL.BIN has been created in the folder CHDK/ (ALT > MENU >Miscellaneous Stuff > File Browser).
When working with DNG files, you should also enable the menu entry RAW buffer cached. The built-in DNG converter will then read the RAW data directly from memory and not from the card, resulting in faster operation. However, if you frequently run into memory problems, disable this option.
DARK FRAME SUBTRACTION AND BAD PIXEL REMOVAL
Do not mistake Bad Pixel Removal for Dark Frame Subtraction. Both have their pros and cons:

No comments yet.