Test Patterns (dart E)#
Test patterns 可用于维护目的和故障诊断。它们是由相机本身生成的,即相机的光学元件和成像传感器未参与其创建。
该功能的使用#
显示测试图案#
显示测试图案,请执行以下操作:
- 选择测试图案,方法是设置
TestPattern
parameter to the desired test image. - 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.
示例代码#
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.) */
You can also use the pylon Viewer to easily set the parameters.