Hot pixels and RAW and dcraw - RAW Shooting and Processing - CHDK Forum

Hot pixels and RAW and dcraw

  • 3 Replies
  • 7445 Views
Hot pixels and RAW and dcraw
« on: 03 / August / 2010, 01:12:29 »
Advertisements
I know that bad pixels that were present when the camera was at the factory are set to zero by the camera and that badpixel.bin is a list of these bad pixels.

When saving as DNG are the zeros removed by CHDK? Or are the raw data and badpixel.bin saved together leaving it up to the raw converter to remove the zeros?

I believe I read a post that said dcraw interpolates out zero'ed pixels from CRW but not DNG. Is that right?

If I use a dummy badpixel.bin will this prevent the removal of zero'ed pixels?

*

Offline fe50

  • ******
  • 3152
  • IXUS50 & 860, SX10 Star WARs-Star RAWs
    • fe50
Re: Hot pixels and RAW and dcraw
« Reply #1 on: 03 / August / 2010, 07:58:27 »
When saving as DNG are the zeros removed by CHDK? Or are the raw data and badpixel.bin saved together leaving it up to the raw converter to remove the zeros?
While DNG creation the bad pixels will always be removed, like requested in the DNG standard.
With RAW (not DNG), the behaviour depends on the CHDK setting in the RAW section.

I corrected & updated the wikia articles, hope this will bring some light into this dark scene ;)

--> http://chdk.wikia.com/wiki/CHDK_User_Manual#Bad_pixel_removal (general badpixel removal)
--> http://chdk.wikia.com/wiki/CHDK_User_Manual#DNG_format (DNG badpixel removal)
--> also: http://chdk.wikia.com/wiki/Badpixel_removal (differences, tools, links)

Quote
I believe I read a post that said dcraw interpolates out zero'ed pixels from CRW but not DNG. Is that right?
--> http://chdk.setepontos.com/index.php/topic,156.msg24317.html#msg24317

Quote
If I use a dummy badpixel.bin will this prevent the removal of zero'ed pixels?
Yes, read http://chdk.setepontos.com/index.php/topic,156.msg24152.html#msg24152 - with sample image :)

Re: Hot pixels and RAW and dcraw
« Reply #2 on: 03 / August / 2010, 16:51:00 »
Thanks. I'm going to write out my understanding of it so it sinks in and to synthesis the information found in all those links in one place. Please correct me if I'm wrong.

badpixel is a list of pixels that have gone bad since the camera left the factory and therefore are unknown to the Canon firmware. badpixel is used by the "Bad pixel removal" option in the RAW menu. The RAWconv option will set the listed pixels to zero.

badpixel.bin is a list of pixels that were zero'ed out by the firmware because they were known to be bad while the camera was at the factory. badpixel.bin is used to patch bad pixels when saving as DNG. The DNG standard requires bad pixels to be patched. Patching bad pixels when saving as DNG cannot be turned off, but a dummy badpixel.bin (one line: 0,0) can be used to prevent patching.

dcraw will interpolate out (i.e. patch) zero'ed pixels when decoding CHDK RAWs (.CRW), but not when decoding DNG (DNGs that follow the standard shouldn't require patching).

rawconvert does not interpolate therefore leaving zero'ed pixels as they are.

When a zero'ed pixel is near a hot pixel (not zero'ed) interpolation can smear the hot pixel when filling in the zero'ed pixel. This is why reyalp wrote rawconvert.

*

Offline reyalp

  • ******
  • 14126
Re: Hot pixels and RAW and dcraw
« Reply #3 on: 03 / August / 2010, 18:47:21 »
When a zero'ed pixel is near a hot pixel (not zero'ed) interpolation can smear the hot pixel when filling in the zero'ed pixel. This is why reyalp wrote rawconvert.
Pretty much. I originally ran into it playing with raw subtract, because it would produce lots of below blacklevel (I didn't know about blacklevel :o) output and dcraw would smear all over it, making the output useless for analyzing the difference images :)

So I decided I needed a "just the data, ma'am" command.

Note that the DNG 1.3 standard allows you to use opcodes to deal with bad pixels, but it isn't widely supported yet. Adding 1.3 as an option for CHDK would be nice.
Don't forget what the H stands for.

 

Related Topics


SimplePortal © 2008-2014, SimplePortal