Badpixel removal
From CHDK Wiki
|
This page contains information on the Badpixel (Hot-Pixel) removal function FOR DNG IMAGES in CHDK.
To remove defective Pixels in an image in CHDK there's the Bad pixel removal feature. Once you have generated a list containing all the "bad" pixels for your camera, CHDK can remove them automatically. The file with the badpixel data is named badpixel (without a filename extension).
- More information on this feature can be found here: Firmware Usage: Hot-Pixel Removal.
[edit] badpixel <--> badpixel.bin
Q: Why are there 2 different files for bad pixel removal—what's the difference?
A: The badpixel.bin is only needed for DNG creation—it includes the badpixels from the Canon firmware. In the RAW image these badpixels are only masked (value = 0), so depending on the software you use you'll get black dots in your image. The file can be generated with the badpixel.lua script, included in the "complete" download package; you can also use a dummy file, containing only some zeros: with this you can enable DNG support, but the bad pixels will not be removed…(Forum link: [1]).
The file badpixel is for the "standard", usual bad/hotpixel removal (also in JPEGs) - this function also removes hotpixels when they are unknown to the Canon firmware.
|
For the new RAW DNG shooting feature a special badpixel file is required, named badpixel.bin |
This file contains the badpixel information already stored in the Canon firmware. Read more in the forum: Save RAW files in DNG format instead of RAW.
[edit] Software
[edit] show_bad_b
show_bad_b by ewavr - with this command line tool you can generate the bad pixel list on a Windows PC.
Usage:
- show_bad_b.exe <CHDK_RAW_FILE_NAME>
The output file badpixel.bin is created in the current folder and the defective pixel count is reported.
- Try several RAW files to obtain a stable result (approximate shooting conditions: minimal ISO, exposure time ~1/10s).
- Some cameras have two defective pixel lists, which are switched at exposure time ~1/25s. Use the list with maximum (but stable) defective pixel count, otherwise you may see multiple black points on image in some RAW convertors.
- Some cameras have three defective pixel lists, which are switched at exposure time ~1/6s and ~1/25s. Use the list with maximum (but stable) defective pixel count, otherwise you may see multiple black points on images in some RAW convertors.
- For DNG RAW shooting place the file here: \CHDK\badpixel.bin
→Download: Links section
[edit] BadpixelPro (under development)
Badpixel Pro by Johann Meißner - a GUI tool to manage and generate the badpixel list on a Windows PC or on an Intel Mac.
Note: This tool is still under development; you can place questions or report bugs on the author's User page
→ Download it from here
Usage:
- → just start Badpixel.exe
- It's quite easy to use this new version so no manual is required.
- You can create several files (ASCII, binary files and bitmaps) from CR2 and binary Files.
- The Mac version creates only ASCII files from CR2 RAW files.
- Try several RAW files to obtain a stable result (approximate shooting conditions: minimal ISO, exposure time ~1/10s).
- Some cameras have two defective pixel lists, which are switched at exposure time ~1/25s. Use the list with maximum (but stable) defective pixel count, otherwise you can see multiple black points on image in some RAW convertors.
- Some cameras have three defective pixel lists, which are switched at exposure time ~1/6s and ~1/25s. Use the list with maximum (but stable) defective pixel count, otherwise you can see multiple black points on image in some RAW convertors.
- For DNG RAW shooting place the file here: \CHDK\badpixel.bin
[edit] badpixel.lua
In the complete download packages there's the script badpixel.lua (located in the folder \CHDK\SCRIPTS\TEST) to generate the badpixel.bin file on-the-fly in the camera.
Just run the script: it automatically takes two pictures, calculates the badpixel data and then it creates the badpixel.bin file. This procedure takes ~20-40 seconds of time. At the end of the process you can save the file with the SET button.
- The current version of the script can also be downloaded directly from the SVN server: badpixel.lua
[edit] Links
- show_bad_b: Generate a list of the bad sensor pixels (DOS/Windows command line): visit download site (click on 'show_bad_b.zip' on the top of the site)
- alternative download sites: drop.io, zShare.net
- show_bad: Generates the "badpixel" file: http://drop.io/chdksoft/asset/2009-01-23-show-bad-zip
- BadpixelPro: The badpixel tool for Windows and Intel Mac with a graphic interface. http://drop.io/badpixel
