Camera Operation Mode#
透過選擇相機操作模式,系統會自動設定某些相機參數,以在特定操作環境中獲得最佳效果。
使用功能#
指定Camera Operation Mode#
若要指定擷取模式,請設定 CameraOperationMode 參數設定為以下值之一:
Standard: 啟用「標準」相機操作模式。LongExposure: 啟用「長時間曝光」相機操作模式。
可用的相機操作模式#
Standard#
這是相機的預設運作模式。在大多數運作條件下,即當參數未設定為極端值時,此模式均適用。
長曝光#
當您使用長曝光時間並希望優化影像品質時,「長曝光」模式便能派上用場。
為了最大限度地發揮此功能的效果,請確保散熱良好、延長曝光時間,並盡可能降低幀率。若您的應用情境允許,請將相機設定為單張拍攝模式,並僅擷取您所需的影像。
「長曝光」模式會增加曝光開始的延遲時間。
當您設定 CameraOperationMode 參數設為 LongExposure, 幀率會下降。請檢查 BslResultingAcquisitionFrameRate 若想了解此參數所產生的效果,請調整該參數。
資訊
變更相機操作模式後,請等待至少十分鐘,讓相機溫度穩定下來。這樣可以確保影像品質的一致性。
範例程式碼#
/* 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 */
/* Enable the Standard camera operation mode */
errRes = PylonDeviceFeatureFromString(hdev, "CameraOperationMode", "Standard");
CHECK(errRes);
/* Enable the Long Exposure camera operation mode */
errRes = PylonDeviceFeatureFromString(hdev, "CameraOperationMode", "LongExposure");
CHECK(errRes);
您也可以 use the pylon Viewer 來輕鬆設定參數。