With a little time this afternoon, I want to talk about the importance of the black level of photosensors used in a digital camera. The black level of a photosensor is determined by the level of noise inherent in the technology, CCD, C-MOS, BSI-C-MOS ... when the sensor actually captures the total darkness (with a cap on, a black frame with long exposure, or ...), the raw yields values greater than zero because of the noise. For example, the 5 least significant bits of a CCD sensor to provide random values and represent a normal distribution around a mean value. Bar chart below shows the distribution function values "black" [Number pixels (0 .. 1500) Vs Pixel value (0 .. 65)] Notes that, of 1500 pixels sampled, the median value (750 pixels) is close to the black level of the unit, 31 (2^5-1). Thus, the demosaicking software uses this black (31 = 2 ^ 5-1) and white (2 ^ 10-1 for a 10-bit) values before making any changes in the sensor values, Raw to RGB regardless of the color space used (Cie, Prophoto, LR, sRGB, ...) Note also that the presence of pixels with values above 31 (about 700 of 1500) will be considered non-black and produce a noise appearance and apparent noise. Having set the black level to 63 (2 ^ 6-1) would have eliminated the appearance of noise in the dark but it would have remained apparent for higher values. Another option would be to truncate the 6 least significant bits to remove the random values and keep only the 4 most significant bits. The problem that flows from it is only 4 bits and only 16 possible values! 0 to 15! Only way to reduce the appearance of noise is to use software for noise reduction taking into account the perception of the human eye, so that it plays tricks on us. Here we talk about noise filter before demosaicking, before the creation of virtual colors.Can a 12-bit sensor is better? The level of a white on 12 bits is (2 ^ 12-1). The black level for a Canon CCD is 7 bits (127 = 2 ^ 7-1). So 12 bits stored in the raw, 7 bits are random. There are only 5 significant bits, as for the 10-bit CCD. The 10-bit and 12-bit refer to the photon-to-digital converter, the sensor is 5-bits accurate (or inaccurate depending on your perspective). Do catch the other parameters (iso, ev, tv, av, ...) have an impact on the black level? To my knowledge, Canon and Sony use sensors whose size is greater than the final image raw. Thus, an area not exposed to light, is dedicated to assessing the level of black. In these cases, no need for a black frame (without recapturing lights), the sensor with simultaneously capture both. By cons, it is necessary that this "black box" is used by the demosaicking software, umm, less certain. Is a C-MOS is greater than 14 bits? To compare the accuracy of a real sensor, how do I determine the level of black? The level of white is 2 ^ 14-1. For the black level it's relatively simple, you take a picture with the lens cap, so completely black. You analyze the resulting values of the raw, binary analysis, not an LR analysis. You count values to obtain a graph similar to the previous. The median should be close to the black level. At that time, you will know how many bits are significant. I hope I've not lost along the way. If I can clarify, ..., I will be happy to photonise you. P.S.: To simplifyFor a CCD sensor, the raw numeric value recorded by each pixel of a sensor reads: Value (10 bits) = Photon (0 .. 31) * 32 + random (0 .. 31) Value (12 bits) = Photon (0 .. 31) * 128 + random (0 .. 127) So, no matter the analogue-digital converter operating at 10 bits or 12 bits, the counting of photons is accurate to one part in 32, the remaining bits is random!
Maybe the CHDK wiki needs a "CHDK Photography in Depth" section ? Should we start one - its free ?
No, a black level of 31 for 10 bit sensor or 127 for 12 bit sensor does not mean that there are only 5 bits of valid image data per pixel. Saying that the bottom 5 or 7 bits is random noise is just wrong.It means that the valid values for each pixel range from 31 - 1023 (10 bit) or 127 - 4095 (12 bit).For example think about the top 2048 values for a 12 bit sensor - once the number of photons hitting the sensor has reached this threshold then the sensor noise and shot noise component is irrelevant. Each and every value from 2048 to 4095 is a valid value with a neglible noise component.Phil.
register int x;register int y;register int val;for ( y = CAM_ACTIVE_AREA_Y1; y < CAM_ACTIVE_AREA_Y2; y++ ) { for ( x = CAM_ACTIVE_AREA_X1; x < CAM_ACTIVE_AREA_X2; x++ ) { val = get_raw_pixel ( x, y ); val = ( ( val >> 5 ) << 5 ) + ( CAM_BLACK_LEVEL + 1 ) * ( ( val % ( CAM_BLACK_LEVEL + 1 ) ) > ( CAM_BLACK_LEVEL >> 1 ) ); val = ( ( val > CAM_WHITE_LEVEL ) ? 0x3E0 : val ); set_raw_pixel ( x, y, val ); };};
Note: this process did not eliminate non-black noise, nor black noise, it only expose proper removal of 5 lsb
Started by RyeBrye General Discussion and Assistance
Started by funnelfan Feature Requests
Started by toby Script Writing
Started by travis4 « 1 2 » LUA Scripting
Started by nc5413 Hello, I'm a NEWBIE - HELP!! (Newbies assistance, User Guides and thank you notes)