### Understanding Binning

Posted:

**Sat Jul 22, 2017 9:12 pm**There's a lot of misunderstanding about how binning improves images and whether software binning (as used by CMOS cameras) is worth using or not. Sadly the situation isn't really helped by some people who don't really understand the situation claiming that they do...

So, let's talk about binning and how it works, but to do that we need to talk about something else first - Noise...

The noise we are talking about here is random variations in pixel brightness value from frame to frame and pixel to pixel - you can see the effect of noise in the images below :

Low Noise (800ms exposures, minimum gain) High Noise (8ms exposures, maximum gain) (These are images taken of a picture of Jupiter for example purposes!)

The really important measure of how noisy an image is isn't just the size of the noise, it's the size of the noise

So, where does the noise come from in an image - there are three main sources that we need to consider

1) Shot Noise - this type of noise is caused by the number of photons that each pixel detects varying randomly from frame to frame and from pixel to pixel. Imagine that you had a way to count raindrops as they fell into a bucket while it was raining. If you counted the number of raindrops going into the bucket every second the number you get wouldn't be the same for all the seconds you measured even if the rain was steady - in some seconds you might get 20, in others 21, 22, 19, 18, 17, 23, etc. This natural variation is shot noise. Interestingly the amount of noise is equal to the square root of the number of photons detected.

2) Read Noise - this type of noise is caused by the process of converting the charge accumulated on the pixel during the exposure (a count of electrons) to a digital value not being exact. Read noise is a property of the imaging sensor itself, so some sensors have higher read noise values than others. In particular modern CMOS sensors tend to have much lower read noise than CCD sensors.

3) Thermal Noise - thermal noise is caused by the heat in the sensor sometimes being able to release electrons in just the same way that an incoming photon can. The sensor detects these electrons as light, adding noise to the image. Read noise tends to build up during longer exposures as there is more time for the thermal electrons to be released and can be ignored for short exposures. Cooling helps to reduce thermal noise dramatically.

Let's put some concrete number behind these as an example... Take a sensor like the IMX178 and set it at a fairly low (but not lowest) gain setting. At this setting we might have the following values

Gain (e/ADU) : 0.25

Read Noise (e-RMS) : 1.7

Exposure : 0.1s

If we have a pixel value (ADU) of 200, that implies that we have detected 50 electrons (multiply the ADU by the gain).

Detecting 50 electrons gives us a shot noise value of Sqrt(50) or roughly 7 electrons.

The exposure is short, so the thermal noise will be effectively zero.

Read noise is 1.7 Electrons

So, total noise = 7e (shot ) + 0e (thermal) + 1.7e (read)

Interestingly, this does *NOT* add up to 8.7e! When adding noise values together you don't just add the values, you take each value, square it, add the squares and then take the square root of the result [unless the sources of noise are correlated with each other, which they are not in this case]. This is called 'adding in quadrature'.

So...

Sqrt ( 7*7 + 1.7*1.7) = Sqrt( 49 + 3) = Sqrt(52) = (approx) 7.2e

Now all we have to do is scale back to ADU using our gain value and we find a noise of about 29ADU.

Let's note a few interesting things about that noise figure before taking a break...

1) The noise is dominated by the shot noise - the read noise has almost no effect because it is smaller to start with and the adding in quadrature ensures that the largest individual source of noise dominates and smaller ones have relatively even less effect.

2) If we had a bigger read noise (10e for instance) then that would dominate the total noise - our sum would give us a total noise of approximately 12.2e. CCD cameras with read noise of 10e are apparently not uncommon...

So, let's talk about binning and how it works, but to do that we need to talk about something else first - Noise...

The noise we are talking about here is random variations in pixel brightness value from frame to frame and pixel to pixel - you can see the effect of noise in the images below :

Low Noise (800ms exposures, minimum gain) High Noise (8ms exposures, maximum gain) (These are images taken of a picture of Jupiter for example purposes!)

The really important measure of how noisy an image is isn't just the size of the noise, it's the size of the noise

**relative to**the brightness of the image itself. This is what we call the 'signal to noise ratio' or SNR for short. To give an example, if an image mostly had a brightness of 200 (out of 255) and the noise meant that the values were spread between 195 and 205 (+/- 5) we might say we have a SNR of 40 (40 = 200 / 5).So, where does the noise come from in an image - there are three main sources that we need to consider

1) Shot Noise - this type of noise is caused by the number of photons that each pixel detects varying randomly from frame to frame and from pixel to pixel. Imagine that you had a way to count raindrops as they fell into a bucket while it was raining. If you counted the number of raindrops going into the bucket every second the number you get wouldn't be the same for all the seconds you measured even if the rain was steady - in some seconds you might get 20, in others 21, 22, 19, 18, 17, 23, etc. This natural variation is shot noise. Interestingly the amount of noise is equal to the square root of the number of photons detected.

2) Read Noise - this type of noise is caused by the process of converting the charge accumulated on the pixel during the exposure (a count of electrons) to a digital value not being exact. Read noise is a property of the imaging sensor itself, so some sensors have higher read noise values than others. In particular modern CMOS sensors tend to have much lower read noise than CCD sensors.

3) Thermal Noise - thermal noise is caused by the heat in the sensor sometimes being able to release electrons in just the same way that an incoming photon can. The sensor detects these electrons as light, adding noise to the image. Read noise tends to build up during longer exposures as there is more time for the thermal electrons to be released and can be ignored for short exposures. Cooling helps to reduce thermal noise dramatically.

Let's put some concrete number behind these as an example... Take a sensor like the IMX178 and set it at a fairly low (but not lowest) gain setting. At this setting we might have the following values

Gain (e/ADU) : 0.25

Read Noise (e-RMS) : 1.7

Exposure : 0.1s

If we have a pixel value (ADU) of 200, that implies that we have detected 50 electrons (multiply the ADU by the gain).

Detecting 50 electrons gives us a shot noise value of Sqrt(50) or roughly 7 electrons.

The exposure is short, so the thermal noise will be effectively zero.

Read noise is 1.7 Electrons

So, total noise = 7e (shot ) + 0e (thermal) + 1.7e (read)

Interestingly, this does *NOT* add up to 8.7e! When adding noise values together you don't just add the values, you take each value, square it, add the squares and then take the square root of the result [unless the sources of noise are correlated with each other, which they are not in this case]. This is called 'adding in quadrature'.

So...

Sqrt ( 7*7 + 1.7*1.7) = Sqrt( 49 + 3) = Sqrt(52) = (approx) 7.2e

Now all we have to do is scale back to ADU using our gain value and we find a noise of about 29ADU.

Let's note a few interesting things about that noise figure before taking a break...

1) The noise is dominated by the shot noise - the read noise has almost no effect because it is smaller to start with and the adding in quadrature ensures that the largest individual source of noise dominates and smaller ones have relatively even less effect.

2) If we had a bigger read noise (10e for instance) then that would dominate the total noise - our sum would give us a total noise of approximately 12.2e. CCD cameras with read noise of 10e are apparently not uncommon...