跳转到内容

Transfer Bit Depth#

Transfer Bit Depth 相机功能允许您更改用于内部图像处理的位深。

减小传输位深可以提高相机的帧速率。增加传输位深可以提高图像质量。

该功能的使用#

为什么使用 Transfer Bit Depth#

The transfer bit depth allows you to change the bit depth of the data to be transferred during internal image processing. This is useful if changing the sensor bit depth isn't recommended due to a sensor's specific characteristics.

Important

If the Transfer Bit Depth feature is available for your camera, always use this feature instead of the Sensor Bit Depth feature. Only if you're not satisfied with the result, change the sensor bit depth.

Transfer Bit Depth 图表

设置传输位深时,请遵循以下准则:

  • 为了获得最佳图像质量,请将传输位深设置为较高值。
    较高的传输位深可以改善图像质量,因为相机的内部图像计算基于更高的位深。
  • 为了获得最佳性能,请将传输位深设置为较低值。
    较低的传感器位深可以提高性能,因为要传输的数据量会减少。

用例#

对于某些相机,如果使用 8 位像素格式,传感器位深会自动设置为 10 位。这取决于所使用的传感器,并取决于传感器的特定特性。对于这些传感器,不建议将传感器位深更改为较低的值,以达到增加相机帧速率等目的,否则会影响某些其他传感器特性。

这就是传输位深发挥作用的地方。您可以设置一个独立于所用传感器位深的值,例如,从提高的帧速率中受益。

Transfer Bit Depth 模式#

The Transfer Bit Depth mode allows you to define whether the transfer bit depth can be set independently of the pixel format used. You can set the BslTransferBitDepthMode parameter to one of the following values:

  • Auto: The transfer bit depth is automatically adjusted depending on the pixel format used. This is the default setting. For example, if you set the pixel format to Bayer 12, the transfer bit depth is automatically set to 12 bit.
  • Manual: The transfer bit depth can be set independently of the pixel format used. For example, you can configure the camera to output 8-bit image data based on 10-bit data used for internal image processing (pixel format = Mono 8, transfer bit depth = 10 bit).

设置 Transfer Bit Depth#

  1. Set the BslTransferBitDepthMode parameter to Manual.
  2. Set the BslTransferBitDepth parameter to the desired value.
    For example, setting the parameter to Bpp12 sets a bit depth of 12 bpp (bits per pixel).

示例代码#

// Set the pixel format to Mono 8
camera.PixelFormat.SetValue(PixelFormat_Mono8);
// Set the transfer bit depth mode to Manual
camera.BslTransferBitDepthMode.SetValue(BslTransferBitDepthMode_Manual);
// Set the transfer bit depth to 10 bit
camera.BslTransferBitDepth.SetValue(BslTransferBitDepth_Bpp10);
INodeMap& nodemap = camera.GetNodeMap();
// Set the pixel format to Mono 8
CEnumParameter(nodemap, "PixelFormat").SetValue("Mono8");
// Set the transfer bit depth mode to Manual
CEnumParameter(nodemap, "BslTransferBitDepthMode").SetValue("Manual");
// Set the transfer bit depth to 10 bit
CEnumParameter(nodemap, "BslTransferBitDepth").SetValue("Bpp10");
// Set the pixel format to Mono 8
camera.Parameters[PLCamera.PixelFormat].SetValue(PLCamera.PixelFormat.Mono8);
// Set the transfer bit depth mode to Manual
camera.Parameters[PLCamera.BslTransferBitDepthMode].SetValue(PLCamera.BslTransferBitDepthMode.Manual);
// Set the transfer bit depth to 10 bit
camera.Parameters[PLCamera.BslTransferBitDepth].SetValue(PLCamera.BslTransferBitDepth.Bpp10);
/* 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 transfer bit depth mode to Manual */
errRes = PylonDeviceFeatureFromString(hdev, "BslTransferBitDepthMode", "Manual");
CHECK(errRes);
/* Set the transfer bit depth to 10 bit */
errRes = PylonDeviceFeatureFromString(hdev, "BslTransferBitDepth", "Bpp10");
CHECK(errRes);
# Set the pixel format to Mono 8
camera.PixelFormat.Value = "Mono8"
# Set the transfer bit depth mode to Manual
camera.BslTransferBitDepthMode.Value = "Manual"
# Set the transfer bit depth to 10 bit
camera.BslTransferBitDepth.Value = "Bpp10"

您也可以使用 pylon Viewer 轻松设置参数。