コンテンツにスキップ

Test Patterns (dart E)#

Test Patternsカメラ機能を使用すると、カメラの基本的な機能と画像の送信機能を確認できます。

テストパターンは、メンテナンスおよび障害診断に使用できます。これらはカメラ自体によって生成されます。つまり、カメラの光学部品とイメージセンサーは生成に関与しません。

機能を使用する#

Test Patternsの表示#

テストパターンを表示するには、次の手順に従います。

  1. Select a test pattern by setting the TestPattern parameter to the desired test image.
  2. Acquire at least one image to display the selected test pattern. If you want to display the test pattern in the pylon Viewer, click the single or continuous shot button on the toolbar.

サンプルコード#

// 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.) */

pylonViewerアを使用して、パラメーターを簡単に設定することもできます。