During scaling, the image size is reduced proportionally by interpolation. Pixel values are added and averaged as required to map them to the pixels of the scaled image. This increases the signal-to-noise ratio.
Scaling is controlled by the scaling factor that you choose. The same factor is applied in horizontal and vertical direction. With a factor of 1.0, the image size stays the same. A factor smaller than 1.0 causes the image width and height to shrink.
Make sure the camera is idle, i.e., not capturing images.
Disable Decimation and Binning by setting the binning and decimation factors to 1.
Set the ScalingHorizontalAbs parameter to the desired scaling value.
Info
Changing the ScalingHorizontalAbs parameter value automatically adapts the ScalingVerticalAbs parameter value. This maintains the original height-to-width ratio.
When the Scaling feature is used, Binning and Decimation aren't available.
You can choose a scaling factor from 0.125 to 1. However, only 112 discrete values are available. If you enter a value that is not available, the float control automatically rounds up or down to the nearest available value.
To calculate valid values use the following formula: 16/x, where x = any natural number between 16 to 128.
Examples
Resulting Scaling Factor
Consequences
16 / 16
1.0
Default setting. Scaling is disabled. No change to the original image size. Binning and Decimation are available.
16 / 17
0.941
16 / 18
0.888
and so on
…
16 / 32
0.5
The image size is reduced by half (factor 2).
16 / 64
0.25
The image size is reduced by factor 4.
and so on
…
16 / 128
0.125
The image size is reduced by factor 8 (largest reduction).
When you are using scaling, image ROI and auto function ROI settings refer to the scaled rows and columns of the modified image and not to the physical rows and columns of the sensor.
For example, assume that you are using a camera with a 3 840 x 2 748 sensor. A scaling factor of 0.5 is applied to full resolution. In this case, the maximum ROI width is 1918 and the maximum ROI height is 1372. The ROI width and height parameters are adjusted automatically. Likewise, any offsets that you have defined before enabling scaling are adjusted automatically.
When scaling is disabled, the ROI increases again, but may be smaller than the original ROI.
Info
Basler recommends that you always check the image ROI settings after disabling scaling and, if necessary, to manually restore the image ROI to the desired size and position.
Using scaling effectively reduces the resolution of the camera's image sensor. For example, if you are configuring a scaling factor of 0.25 on a camera with a 3 840 x 2 748 sensor, the effective resolution of the camera is reduced to 954 x 682.
During scaling, the image dimensions are rounded frequently. If you change the scaling factor repeatedly, the rounding effects accumulate. When returning to a previous image size, the dimensions that were lost due to rounding can't be restored.
To avoid cumulative rounding losses, restore the previous image size manually. Alternatively, return to a "reference" image size, e.g., to full resolution, and specify the image size manually to avoid rounding errors.
// Set horizontal scaling to 0.5camera.ScalingHorizontalAbs.SetValue(0.5);// Disable scalingcamera.ScalingHorizontalAbs.SetValue(1);
INodeMap&nodemap=camera.GetNodeMap();// Set horizontal scaling to 0.5CFloatParameter(nodemap,"ScalingHorizontalAbs").SetValue(0.5);// Disable scalingCIntegerParameter(nodemap,"ScalingHorizontalAbs").SetValue(1);
// Set horizontal scaling to 0.5camera.Parameters[PLCamera.ScalingHorizontalAbs].SetValue(0.5);// Disable scalingcamera.Parameters[PLCamera.ScalingHorizontalAbs].SetValue(1);
/* 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 *//* Set horizontal scaling to 0.5 */errRes=PylonDeviceSetFloatFeature(hdev,"ScalingHorizontalAbs",0.5);CHECK(errRes);/* Disable scaling */errRes=PylonDeviceSetIntegerFeature(hdev,"ScalingHorizontalAbs",1);CHECK(errRes);
# Set horizontal scaling to 0.5camera.ScalingHorizontalAbs.Value=0.5# Disable scalingcamera.ScalingHorizontalAbs.Value=1
// Set horizontal scaling to 0.5camera.ScalingHorizontal.SetValue(0.5);// Disable scalingcamera.ScalingHorizontal.SetValue(1);
INodeMap&nodemap=camera.GetNodeMap();// Set horizontal scaling to 0.5CFloatParameter(nodemap,"ScalingHorizontal").SetValue(0.5);// Disable scalingCIntegerParameter(nodemap,"ScalingHorizontal").SetValue(1);
// Set horizontal scaling to 0.5camera.Parameters[PLCamera.ScalingHorizontal].SetValue(0.5);// Disable scalingcamera.Parameters[PLCamera.ScalingHorizontal].SetValue(1);
/* 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 *//* Set horizontal scaling to 0.5 */errRes=PylonDeviceSetFloatFeature(hdev,"ScalingHorizontal",0.5);CHECK(errRes);/* Disable scaling */errRes=PylonDeviceSetIntegerFeature(hdev,"ScalingHorizontal",1);CHECK(errRes);
# Set horizontal scaling to 0.5camera.ScalingHorizontal.Value=0.5# Disable scalingcamera.ScalingHorizontal.Value=1