# Color binning on Bayer sensor

Is there a difference between doing binning on a Bayer sensor before or after the ADC with respect to spatial information lost?

How the debayering works should not matter, Assuming the same method is used for both ways.

A:

1. Horizontal 2x1 binning before ADC by adding up pixels of same color
2. debayering of the binned Bayer pattern.

B:

1. Debayering

Is there any advantage of A over B except lower noise?

In the end, I think the same spatial information is lost. Meaning information from the same originally neighboring sensor pixels ends up in any given final image pixel.

• @OlinLathrop there are NO undefined terms nor are there any non standard usage of language here. Sampling (both spatially and in bit depth) are well understood concepts in EE. Binning is is an easily understood concept in the real world or in signal processing terms. Feb 14, 2013 at 16:05
• "Binning" is unclear. Often it refers to classifying into different "bins" by some paramter, but here it seems to be used more to imply a contribution from a convolution, maybe, sortof. Perhaps this is well enough defined within a narrow niche, but that is the point. I can guess what "horizontal 2x1 binning" might mean, but I shouldn't have to, and I don't want to spend time on a answer based on wrong assumption about the question. Feb 15, 2013 at 13:13

From a purely MTF (Modulation Transfer Function) point of view the operations you describe are identical. Adding the same pixels in the analog domain or the digital domain will give you the same spatial results with it's blurring, Moire fringes and other artifacts.

In terms of noise it very much depends upon how well you are digitizing the signal.

A CCD bins by summing charge, the noise will increase by $\sqrt{N}$ and the signal will increase by ${N}$. The ADC noise floor will be the same so this signal will be readily digitized, at the risk of running out of head room on the ADC (the bright parts of the scene will clip). Assuming the ADC was setup to digitize the right level of noise it will only get better. Binning in the analog domain can potential increase your frame rate.

Summing after digitization is more convenient since it is simply a memory access to get the same colors gathered together. There is less supporting circuitry and certainly less analog circuitry with analog storage elements. the mathematics for the SNR is very similar in this case, the main difference here is that if your digitization level does not include enough of the noise floor then when you do the summing in the digital domain the noise patterns may be very unpleasant. Because you are sampling at the what the ADC resolution is, this thresholding can increase the noise in the digital domain. However, if the the noise level is sufficiently higher than the ADC noise then it will look the same as the analog domain.

All things being equal, the digital domain is easiest and less expensive.

• Thanks! (Is a thank you OK in a comment?) the first paragraph is what I was looking for. The rest also is helpful!
– LV3
Feb 14, 2013 at 16:10
• @user176840 here we pay good answers with upvotes! So the best way to say thanks is hitting the up arrow. If this solves your problem you can click the green checkmark also, but you might want to wait just a little and see what else people have to say here. But if you consider it resolved... You did it! Glad you found the help you needed. Feb 14, 2013 at 16:12
• If you need analysis pop a line. The ADC DNL is the main concern here and it can cause spectral splattering. Feb 14, 2013 at 16:14
• @Kortuk, thanks for the hint. I had already marked it as an answer but that will probably keep people from looking at the question. I am not 100% sure yet so I will remove again and flag later if no one else answers.
– LV3
Feb 14, 2013 at 16:15
• @user176840 Yes, sadly we dont have users that see an accepted answer as a challenge and instead a mark of completion. Feb 14, 2013 at 16:18