Skip to content

Test Patterns (dart E)#

The Test Patterns camera feature allows you to check the camera's basic functionality and its ability to transmit images.

Test patterns can be used for maintenance purposes and failure diagnostics. They are generated by the camera itself, i.e., the optics and the image sensor of the camera are not involved in their creation.

Using the Feature#

Displaying Test Patterns#

To display a test pattern:

  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.

Sample Code#

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

You can also use the pylon Viewer to easily set the parameters.