Sensor Bit Depth#
降低 Sensor Bit Depth 可以增加相機的 畫面更新率。增加 Sensor Bit Depth 可以提高 Quality。
使用功能#
為什麼要使用 Sensor Bit Depth#
Sensor Bit Depth 定義了影像感測器所輸出資料的位元深度。相機所執行的所有後續影像處理皆以此資料為基礎。
設定 Sensor Bit Depth 時,請遵循以下原則:
- 為了達到最佳 Quality,請將 Sensor Bit Depth 設定為高值。
較高的 Sensor Bit Depth 可以改善 Quality,因為相機內部的影像計算是以較高的位元深度為基礎。 - 為了達到最佳效能,請將 Sensor Bit Depth 設定為低值。
較低的 Sensor Bit Depth 可以改善效能,因為 Sensor Readout Time 較短。
Sensor Bit Depth Mode#
Sensor Bit Depth Mode 允許您定義是否可以獨立於所使用的 Pixel Format 來設定 Sensor Bit Depth。您可以設定 BslSensorBitDepthMode 參數設定為以下值之一:
Auto:Sensor Bit Depth 會根據所使用的 像素格式 自動調整。這是預設設定。例如,如果您將 Pixel Format 設定為 Bayer 12,Sensor Bit Depth 會自動設定為 12 bit。Manual:Sensor Bit Depth 可以獨立於所使用的 Pixel Format 進行設定。例如,您可以將相機設定為根據 12-bit 感測器資料輸出 8-bit 影像資料(Pixel Format = Mono 8,Sensor Bit Depth = 12 bit)。
資訊
- 在 a2A1920、a2A4504、a2A5320、a2A5328、boA4096、boA4112、boA4504、boA5320、boA5328 和 dart M 相機上,如果您設定
BslSensorBitDepthMode參數設為Auto並選擇 8-bit Pixel Format(例如 Mono 8),Sensor Bit Depth 會設定為 10 bit。這能在不犧牲效能的情況下改善 Quality。 - 在 boA4096、boA4112、boA4504、boA5320、boA5328、a2A2560-131cmSWIR 和 a2A2048-173cmSWIR 相機上,將 Sensor Bit Depth 設定為 8 bit 會產生以下影響:
- Full well capacity 減少了 1/4
- 動態範圍縮小
- 較高的畫面更新率
- 在 boA13440-17cm 相機上,Sensor Bit Depth 會根據所使用的 Pixel Format 受到限制。感測器輸出資料的位元深度必須永遠大於或等於所傳輸影像資料的格式。例如,如果您將相機設定為輸出 12-bit 影像資料,感測器資料只能設定為 12 或 14 bit(Pixel Format = Mono 12,Sensor Bit Depth = 12 bit 或 14 bit)。
設定 Sensor Bit Depth#
- 將相機中的
BslSensorBitDepthMode參數設為Manual. - 將相機中的
BslSensorBitDepth參數設定為所需的數值。
例如,將參數設定為Bpp12會設定 12 bpp(每像素位元數)的位元深度。
範例程式碼#
INodeMap& nodemap = camera.GetNodeMap();
// Set the pixel format to Mono 8
CEnumParameter(nodemap, "PixelFormat").SetValue("Mono8");
// Set the sensor bit depth mode to Manual
CEnumParameter(nodemap, "BslSensorBitDepthMode").SetValue("Manual");
// Set the sensor bit depth to 8 bit
CEnumParameter(nodemap, "BslSensorBitDepth").SetValue("Bpp8");
// Set the pixel format to Mono 8
camera.Parameters[PLCamera.PixelFormat].SetValue(PLCamera.PixelFormat.Mono8);
// Set the sensor bit depth mode to Manual
camera.Parameters[PLCamera.BslSensorBitDepthMode].SetValue(PLCamera.BslSensorBitDepthMode.Manual);
// Set the sensor bit depth to 8 bit
camera.Parameters[PLCamera.BslSensorBitDepth].SetValue(PLCamera.BslSensorBitDepth.Bpp8);
/* 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 mode to Manual */
errRes = PylonDeviceFeatureFromString(hdev, "BslSensorBitDepthMode", "Manual");
CHECK(errRes);
/* Set the sensor bit depth to 8 bit */
errRes = PylonDeviceFeatureFromString(hdev, "BslSensorBitDepth", "Bpp8");
CHECK(errRes);
您也可以 use the pylon Viewer 來輕鬆設定參數。