Test Patterns (dart E)#
Test Patterns 可用於維護目的與故障診斷。它們是由相機本身產生的,也就是說,相機的光學元件與影像感測器並未參與其建立過程。
使用功能#
顯示 Test Patterns#
若要顯示 Test Patterns:
- 透過設定以下項目來選擇 Test Patterns:
TestPattern將參數套用至所需的測試影像。 - 擷取至少一張影像以顯示所選的 Test Patterns。如果您想在 pylon Viewer 中顯示 Test Patterns,請按一下工具列上的單張或連續拍攝按鈕。
範例程式碼#
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 輕鬆設定參數。