The Canon RAW only shows the overexposed data, ie a spike at 4095 and no data anywhere else.
The DNG shows the spike at 4095 and a spike of about 700 at 0.
I'm assuming those are your 700 dead pixels that showed as colored dots in the dng image. Canon must be correcting them before saving them in its own raw format.
Yes, they are dead pixels - when read out from the sensor the value returned is 0.
So a dead pixel is always 0, and a hot pixel is always 0x0FFF (12-bit camera)?
I always thought badpixel.bin was for hot pixels, but it sounds like it mainly removes dead pixels.
So if I went through the entire active area raw buffer looking for 0 pixels or isolated 0x0FFF pixels and set them to the neighboring (same color) pixel value (or average of its neighbors), would that solve the bad/hot pixel problem? I'm not saying it's worth doing, just trying to understand what's going on.
But it might be worth it if you're saving long exposure jpg only files with dark frames off and want to keep hot pixels out of the jpg. If I could get through the raw buffer in under 1 second, it would be an improvement over taking a 1 or more second dark frame after each shot.
recent CMOS cameras can have tens of thousands of dead pixels
Oh my! Maybe I'll test it by setting my histogram step size to 1 and then:
print(get_histo_range(0,0,0))