跳至內容
測試伺服器
開發伺服器

Test Patterns (dart E)#

Test Patterns camera feature 可讓您檢查相機的基本功能及其傳輸影像的能力。

Test Patterns 可用於維護目的與故障診斷。它們是由相機本身產生的,也就是說,相機的光學元件與影像感測器並未參與其建立過程。

使用功能#

顯示 Test Patterns#

若要顯示 Test Patterns:

  1. 透過設定以下項目來選擇 Test Patterns: TestPattern 將參數套用至所需的測試影像。
  2. 擷取至少一張影像以顯示所選的 Test Patterns。如果您想在 pylon Viewer 中顯示 Test Patterns,請按一下工具列上的單張或連續拍攝按鈕。

範例程式碼#

// Select test image 1
camera.TestPattern.SetValue(TestImageSelector_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.)
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.)
// Select test image 1
camera.Parameters[PLCamera.TestPattern].SetValue(PLCamera.TestImageSelector.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.) */
# Select test image 1
camera.TestPattern.Value = "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.) */

您也可以使用 pylon Viewer 輕鬆設定參數。