Test Patterns (dart E)#
測試圖樣可用於維護目的與故障診斷。它們是由相機本身產生的,也就是說,相機的光學元件與影像感測器並未參與其建立過程。
使用此功能#
顯示 Test Patterns#
若要顯示測試圖樣:
- 透過將
TestPattern參數設定為所需的測試影像來選擇測試圖樣。 - 擷取至少一張影像以顯示所選的測試圖樣。如果您想在 pylon Viewer 中顯示測試圖樣,請按一下工具列上的單張或連續拍攝按鈕。
範例程式碼#
INodeMap& nodemap = camera.GetNodeMap();
// Select test image 1
CEnumParameter(nodemap, "TestPattern").SetValue("Testimage1");
// Acquire images to display the selected test image
// ...
// (Insert your own image grabbing routine here.
// For example, the InstantCamera class provides the StartGrabbing method.)
/* 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 */
/* Select test image 1 */
errRes = PylonDeviceFeatureFromString(hdev, "TestPattern", "Testimage1");
CHECK(errRes);
/* Acquire images to display the selected test image */
/* ... */
/* (Insert your own image grabbing routine here. */
/* For example, the InstantCamera class provides the StartGrabbing method.) */
/* 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 */
/* Select test image 1 */
errRes = PylonDeviceFeatureFromString(hdev, "TestPattern", "Testimage1");
CHECK(errRes);
/* Acquire images to display the selected test image */
/* ... */
/* (Insert your own image grabbing routine here. */
/* For example, the InstantCamera class provides the StartGrabbing method.) */
您也可以使用 pylon Viewer 輕鬆設定參數。