

finally, it greys out the pixels that are affected by any of the blown pixels (raw value > max value, taken from darktable's raw black/white level module).performs a simple demosaic by interpolating values from neighbouring pixels for the missing components (is that bilinear? I don't even know).applies the WB coefficients taken from darktable's WB module.applies the black and white points I took from darktable's raw black/white point module.
#Darktable black and white code#
I exported the raw data using dcraw -4 -W -T into a tiff file, and ran it through a tool I have started to code in order to understand raw development a bit more. I took a raw file that contains a large blown-out area. Sorry about the multiple updates - I'm quite tired and discovered a number of silly mistakes in the comment.


I'm adding it here, although it's not about the raw over-exposure indicator, rather about what's clipped and what's not. Looking at the raw sensor data it seems that the green channels always saturate first, then red, and finally blue. Setting the indicators in darktable to 2.0 and reconstruct in Lch showed magenta in the areas where only the green channels were blown and raw overexposed in the areas where red, green, and sometimes blue were blown. I used the black and white levels from the raw file to determine what was clipped. I used dcraw to extract the sensor data, then octave to play with the individual channels. I took an image that showed raw overexposed areas. If you set the clipping threshold to 2.0 in the raw overexposed indicator and highlight reconstruction to 2.0 and reconstruct in Lch, then anything that shows as raw overexposed is blown in 3 (2 greens and something else) or more channels and anything showing in magenta is blown in 1 channel. So while sensor clipped = raw overexposed, raw overexposed != sensor clipped.Ĭan you use the raw overexposed indicator to figure out if the sensor clipped? I believe so. I think I've discovered the problem with the raw overexposure indicator.
