The camera camera supports binning in which columns and/or rows of pixels are combined to achieve a reduced overall image size without changing the image’s field of view. This feature may result in an increase of camera’s frame rate.
The binning factor indicates how many pixels in the horizontal and vertical axis are combined. For example, when applying 2×2 binning, which is 2 pixels in the horizontal axis and 2 pixels in the vertical axis, 4 pixels combine to form 1 pixel. The resultant pixel values can be summed or averaged.
When binning is used, the settings of the image width and height will be affected. For example, if you are using a camera with sensor resolution of 2448 x 2048 and apply 2×2 binning, the effective resolution of the resultant image is reduced to 1224 x 1024. This can be verified by checking the Width and Height nodes.
The following pseudocode demonstrates configuring binning on the camera:
1 2 3 4 5 6 7 8 9 10 11
// Connect to camera // Get device node map BinningSelector = Digital; // Digital binning is performed by FPGA, some cameras will support BinningSelector = Sensor BinningHorizontalMode = Sum; // Binned horizontal pixels will be summed (additive binning) BinningVerticalMode = Sum; // Binned vertical pixels will be summed (additive binning) BinningHorizontal = 2; // Set Horizontal Binning by a factor of 2 BinningVertical = 2; // Set Vertical Binning by a factor of 2 // Resulting image is 1/4 of original size