# Why does pixel binning remove colors and provide monochrome image only with CMOS color cameras?

Some industrial cameras (astrophotography or microscopy) offer a hardware digital "binning" feature. Indeed, sending uncompressed 10 megapixels x 3 RGB bytes per pixel x 30 frames per second = 858 MB/sec is quite heavy for a monitoring PC, even if the camera is USB3.0!

Vendors usually offer "binning" from 1x1 to 16x16 (ex: with 4x4 horizontal and vertical binning, the image size will be 16 times smaller), but in all cases I have always seen:

Note that when using binning greater than 1x1, the image will be monochrome.

Question: for which hardware reason do CMOS color cameras produce monochrome image when we use binning/subsampling? Is it related to Bayer matrix?

• I'm not sure this is an electrical engineering question. Are you sure it shouldn't be on photography.SE? Jun 27 at 15:20
• @Hearth photography.SE is more on the artistic or technical postprocessing side, but not really on the electronics aspect (Bayer matrix, CMOS sensors, etc.).
– Basj
Jun 27 at 15:21
• @Hearth I think this is EE. I also think it's just because it's at least three times more circuitry to bin the different colours together than to mash them into a single luminance signal. Jun 27 at 15:21
• @DKNguyen This might be the answer then... So sad we can't do binning and keep RGB colors :)
– Basj
Jun 27 at 15:22
• @Basj I don't know what binning is used for but it would seem there is no market need for coloured versions of it. Jun 27 at 15:23

It could be because of the Bayer (color filter) array, although that depends on the camera manufacturer making a particular set of decisions.

Adjacent pixels have filters in front of them that make each pixel responsive to one set of wavelengths; a full-color image is produced using algorithms (called "demosaicing") that propagate the color values from the pixels that capture that color to neighboring pixels (not always in linear ways; there might be edge-detection or other clever algorithms involved).

If you bin pixels at the stage where they're read out from the sensor, before the demosaicing algorithm runs, then the demosaicing won't work properly, and needs to be bypassed. In the simplest case (an RGBG array and 2x2 binning, or any multiple of 2), the binning perfectly erases the color information because every bin contains all three colors, in the same proportion as every other bin (1R : 2G : 1B). In less-simple cases there could be some residual color-spatial information left after binning, but it would require a different algorithm to resolve, and it would be of poor resolution anyway, and not really worth bothering with.

But couldn't you do the pixel binning after the demosaicing? Yes, you could. And if the purpose of binning is to reduce the bandwidth going to the PC, it seems that you should. So why not do that? I've tried to think of a reason, and I can only come up with one sensible one: the manufacturer decided not to implement demosaicing in hardware, to save money — it's done on the PC instead. If that was the case, demosaicing before binning wouldn't be an option, and you'd be stuck with monochrome.

• Thanks for your answer. Now I see it's probably done before demosaicing, therefore the color info is lost. But couldn't you do the pixel binning after the demosaicing? Yes, you could. And if the purpose of binning is to reduce the bandwidth going to the PC, it seems that you should. So why not do that? I don't know if it's possible to ask the driver to bin after demosaicing the Bayer. Would be interesting!
– Basj
Jun 27 at 16:23
• Reference: thorlabs.com/…, click on "Specs" then Vertical and Horizontal Digital Binning (c) For color cameras, binning greater than 1 x 1 is only available when the camera is operating in unprocessed mode (monochrome).
– Basj
Jun 27 at 16:23
• You do not have to bin after debayering. You can bin at Bayer quad level, combining adjacent green with adjacent green, red with red, and blue with blue. So why not do that? Point grey and many other vendors will sell you cameras that do exactly this. Jun 27 at 18:53
• @Basj That is a budget scientific camera that Thorlabs launched to undercut higher end models. One of the ways they reduced the price was by omitting features. If you want those features, pay for them. Overthinking this or looking for a hardware reason a budget device doesn't support advanced features is nonsense. It is all price. Buy a different camera that supports what you need. Jun 27 at 18:56
• @user1850479 or that, yes :) Jun 27 at 18:57

There is no hardware reason this is done, and not all CMOS cameras revert to monochrome when binning. Most likely the vendor did not expect demand for the feature and so did not implement it. Particularly for microscopy or industrial uses color sensors are less frequently used, so features specific to color imaging are less likely to be prioritized.