Make sure the camera is idle, i.e., not capturing images.
Set the BinningHorizontalMode parameter to one of the following values (if available):
Sum: The values of the affected pixels are summed. This improves the signal-to-noise ratio, but also increases the camera's response to light.
Average: The values of the affected pixels are averaged. This greatly improves the signal-to-noise ratio without affecting the camera's response to light.
Set the BinningVerticalMode parameter accordingly, if available.
Both binning modes (Sum and Average) reduce the amount of image data to be transferred. This may increase the camera's frame rate.
Depending on the specified binning factors, Sensor and FPGA binning can be performed individually or together.
Info
On boost R cameras, enabling sensor binning will disable vignetting correction. The VignettingCorrectionMode parameter will be set to Off. To turn vignetting correction on again, disable sensor binning and set the VignettingCorrectionMode parameter to On.
On other cameras, if you have performed vignetting correction, changing the binning factor for sensor binning will disable vignetting correction. The VignettingCorrectionMode parameter will be set to Off, and you won't be able to turn it on again until one of the following happens:
You reset the binning factor to the factor that you performed vignetting correction with.
You perform vignetting correction again with the new factor.
When you are using binning, the settings for your image ROI and auto function ROIs refer to the binned rows and columns. Also, the effective resolution of the sensor is reduced.
For example, assume that you are using a camera with a 1280 x 960 sensor. Horizontal binning by 2 and vertical binning by 2 are enabled. In this case, the maximum ROI width is 640 and the maximum ROI height is 480. The effective resolution of the sensor is reduced to 640 x 480.
Using binning with the binning mode set to Sum can significantly increase the camera's response to light. When pixel values are summed, the acquired images may look overexposed. If this is the case, you can reduce the lens aperture, the intensity of your illumination, the camera's Exposure Time setting, or the camera's Gain setting.
Objects will only appear undistorted in the image if the numbers of binned lines and columns are equal. With all other combinations, objects will appear distorted. For example, if you combine vertical binning by 2 with horizontal binning by 4, the target objects will appear squashed.
The binning modes are preset, and the BinningHorizontalMode and BinningVerticalMode parameters aren't available.
If vertical binning is set to 2, the vertical binning mode is set to Average.
If vertical binning is set to 4, a modified summing algorithm will be used: Pixel values of line 1 and 2 are summed, pixel values of line 3 and 4 are skipped, pixel values of line 5 and 6 summed, and so on.
Always set horizontal binning first, then set vertical binning. Otherwise, some combinations can't be achieved.
Horizontal binning by 3 is not supported. Setting the parameter value to 3 is allowed, but will result in an effective horizontal binning by 2.
If vertical binning is used, the limits for the minimum gain settings are automatically lowered. This allows you to use lower gain settings than would otherwise be available.
Setting vertical binning to 3 changes the average gray value, i.e., the brightness of your images, significantly.
Always set the horizontal binning mode first, then set the vertical binning mode. Otherwise, some combinations can't be achieved.
The maximum image width with Sensor Binning (i.e. 1232) is smaller than the maximum image width without Sensor Binning divided by 2 (i.e. 2472/2 = 1236).
The maximum image width with Sensor Binning (i.e. 1424) is smaller than the maximum image width without Sensor Binning divided by 2 (i.e. 24856/2 = 1428).
// Enable sensor binning// Note: Available on selected camera models onlycamera.BinningSelector.SetValue(BinningSelector_Sensor);// Enable horizontal binning by 4camera.BinningHorizontal.SetValue(4);// Enable vertical binning by 2camera.BinningVertical.SetValue(2);// Set the horizontal binning mode to Averagecamera.BinningHorizontalMode.SetValue(BinningHorizontalMode_Average);// Set the vertical binning mode to Sumcamera.BinningVerticalMode.SetValue(BinningVerticalMode_Sum);
INodeMap&nodemap=camera.GetNodeMap();// Enable sensor binning// Note: Available on selected camera models onlyCEnumParameter(nodemap,"BinningSelector").SetValue("Sensor");// Enable horizontal binning by 4CIntegerParameter(nodemap,"BinningHorizontal").SetValue(4);// Enable vertical binning by 2CIntegerParameter(nodemap,"BinningVertical").SetValue(2);// Set the horizontal binning mode to AverageCEnumParameter(nodemap,"BinningHorizontalMode").SetValue("Average");// Set the vertical binning mode to SumCEnumParameter(nodemap,"BinningVerticalMode").SetValue("Sum");
// Enable sensor binning// Note: Available on selected camera models onlycamera.Parameters[PLCamera.BinningSelector].SetValue(PLCamera.BinningSelector.Sensor);// Enable horizontal binning by 4camera.Parameters[PLCamera.BinningHorizontal].SetValue(4);// Enable vertical binning by 2camera.Parameters[PLCamera.BinningVertical].SetValue(2);// Set the horizontal binning mode to Averagecamera.Parameters[PLCamera.BinningHorizontalMode].SetValue(PLCamera.BinningHorizontalMode.Average);// Set the vertical binning mode to Sumcamera.Parameters[PLCamera.BinningVerticalMode].SetValue(PLCamera.BinningVerticalMode.Sum);
/* Macro to check for errors */#define CHECK(errc) if (GENAPI_E_OK != errc) printErrorAndExit(errc)GENAPIC_RESULTerrRes=GENAPI_E_OK;/* Return value of pylon methods *//* Enable sensor binning *//* Note: Available on selected camera models only */errRes=PylonDeviceFeatureFromString(hdev,"BinningSelector","Sensor");CHECK(errRes);/* Enable horizontal binning by 4 */errRes=PylonDeviceSetIntegerFeature(hdev,"BinningHorizontal",4);CHECK(errRes);/* Enable vertical binning by 2 */errRes=PylonDeviceSetIntegerFeature(hdev,"BinningVertical",2);CHECK(errRes);/* Set the horizontal binning mode to Average */errRes=PylonDeviceFeatureFromString(hdev,"BinningHorizontalMode","Average");CHECK(errRes);/* Set the vertical binning mode to Sum */errRes=PylonDeviceFeatureFromString(hdev,"BinningVerticalMode","Sum");CHECK(errRes);
# Enable sensor binning# Note: Available on selected camera models onlycamera.BinningSelector.Value="Sensor"# Enable horizontal binning by 4camera.BinningHorizontal.Value=4# Enable vertical binning by 2camera.BinningVertical.Value=2# Set the horizontal binning mode to Averagecamera.BinningHorizontalMode.Value="Average"# Set the vertical binning mode to Sumcamera.BinningVerticalMode.Value="Sum"