Ask Your Question

changing binning_x,binning_y

asked 2011-08-02 17:57:53 -0500

chen gravatar image


When I change the binning_x and binning_y of prosilica_driver from reconfigure_gui, the color of image_raw turns to black and white. Are there are any ways to keep image_raw colored when I change binnings?

Thanks in advance,

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2011-08-03 10:07:53 -0500

Patrick Mihelich gravatar image

No. Color cameras generally work by imposing a Bayer pattern on the image sensor, where each pixel is covered by a filter so that it detects only one color channel (red, green or blue). For example, an RGGB Bayer camera gives you raw images laid out like this:

RG  RG  RG  RG  ...
GB  GB  GB  GB  ...

RG  RG  RG  RG  ...
GB  GB  GB  GB  ...

This is a one-channel image, where each pixel only has information about a single color. Transforming the raw Bayer image into a normal, 3-channel color image is called debayering. There are numerous debayering algorithms of varying sophistication, but the idea is always to interpolate the missing color data from nearby pixels. In ROS, debayering is performed by image_proc.

Binning changes how the camera accumulates the charge at each pixel. With 2x2 binning, 2x2 blocks of pixels are combined into super-pixels using the summed charges of the 4 actual pixels. In this case, every 2x2 Bayer pattern block gets averaged into a monochrome super-pixel:

M M M M ...
M M M M ...

M M M M ...
M M M M ...

You no longer have distinct samples for each color in the raw image.

There are some cameras with a "color binning" feature, which use more complicated circuitry to accumulate each color separately and thus preserve the Bayer pattern in the binned image. As far as I know there aren't any Prosilica cameras with this feature.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2011-08-02 17:57:53 -0500

Seen: 172 times

Last updated: Aug 03 '11