Decreasing the sensor bit depth can increase the camera's frame rate. Increasing the sensor bit depth can increase image quality.
In this topic Hide
The sensor bit depth defines the bit depth of the data output by the image sensor. All further image processing performed by the camera is based on this data.
You can set the sensor bit depth independently of the pixel format used. For example, you can configure the camera to output 8-bit image data based on 12-bit sensor data (pixel format = Mono 8, sensor bit depth = 12 bit).
When setting the sensor bit depth, the following guidelines apply:
To set the sensor bit depth, set the BslSensorBitDepth parameter to the desired value. For example, setting the parameter to Bpp8 sets a bit depth of 8 bpp (bits per pixel).
// Set the pixel format to Mono 8
camera.PixelFormat.SetValue(PixelFormat_Mono8);
// Set the sensor bit depth to 8 bit
camera.BslSensorDataWidth.SetValue(BslSensorDataWidth_DW8)
INodeMap& nodemap = camera.GetNodeMap();
// Set the pixel format to Mono 8
CEnumerationPtr(nodemap.GetNode("PixelFormat"))->FromString("Mono8");
// Set the sensor bit depth to 8 bit
CEnumerationPtr(nodemap.GetNode("BslSensorDataWidth"))->FromString("DW8");
// Set the pixel format to Mono 8
camera.Parameters[PLCamera.PixelFormat].SetValue(PLCamera.PixelFormat.Mono8);
// Set the sensor bit depth to 8 bit
camera.Parameters[PLCamera.BslSensorDataWidth].SetValue(PLCamera.BslSensorDataWidth.DW8);
// Set the pixel format to Mono 8
Pylon.DeviceFeatureFromString(hdev, "PixelFormat", "Mono8");
// Set the sensor bit depth to 8 bit
Pylon.DeviceFeatureFromString(hdev, "BslSensorDataWidth", "DW8");
/* Macro to check for errors */
#define CHECK(errc) if (GENAPI_E_OK != errc) printErrorAndExit(errc)
GENAPIC_RESULT errRes = GENAPI_E_OK; /* Return value of pylon methods */
/* Set the pixel format to Mono 8 */
errRes = PylonDeviceFeatureFromString(hdev, "PixelFormat", "Mono8");
CHECK(errRes);
/* Set the sensor bit depth to 8 bit */
errRes = PylonDeviceFeatureFromString(hdev, "BslSensorDataWidth", "DW8");
CHECK(errRes);
You can also use the pylon Viewer to easily set the parameters.