Test Patterns

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. Therefore, the optics or the imaging sensor of the camera are not involved in their creation.

In this topic Hide

Using the Feature

Displaying Test Patterns

  1. Select a test pattern by setting the TestPattern parameter to one of the following values:
  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 in the toolbar.

Available Test Patterns

Depending on your camera model, the following test patterns are available:

Gray Diagonal Sawtooth (8 bit)

Test Pattern Diagonal Gray Gradient

Color Diagonal Sawtooth

Test Pattern Diagonal Color Gradient

Black

Completely black test pattern.

Test Pattern Black

Color Bar

Test Pattern Color Bar

Color Bar 2

Test Pattern Color Bar 2

Specifics

Camera Model Available Test Patterns
All ace 2 GigE camera models tbd
All ace 2 USB 3.0 camera models tbd

All ace USB 3.0 camera models

Test Patterns feature not available (see Test Images)
All ace GigE camera models Test Patterns feature not available (see Test Images)
All boost CXP-12 camera models tbd
All dart BCON for LVDS camera models
  • Gray Diagonal Sawtooth
  • Color Diagonal Sawtooth
All dart BCON for MIPI cameras models
  • Black
  • Color Bar
  • Color Bar 2
All dart USB 3.0 camera models
  • Gray Diagonal Sawtooth
  • Color Diagonal Sawtooth
All pulse USB 3.0 camera models
  • Gray Diagonal Sawtooth
  • Color Diagonal Sawtooth

Sample Code

// Select the Gray Diagonal Sawtooth test pattern
camera.TestPattern.SetValue(TestPattern_GreyDiagonalSawtooth8);
// Select the Color Diagonal Sawtooth test pattern
camera.TestPattern.SetValue(TestPattern_ColorDiagonalSawtooth8);
// Acquire images to display the selected test pattern
// ...
// (Insert your own image grabbing routine here. 
// For example, the InstantCamera class provides the StartGrabbing method.)
INodeMap& nodemap = camera.GetNodeMap();
// Select the Gray Diagonal Sawtooth test pattern
CEnumerationPtr(nodemap.GetNode("TestPattern"))->FromString("GreyDiagonalSawtooth8");
// Select the Color Diagonal Sawtooth test pattern
CEnumerationPtr(nodemap.GetNode("TestPattern"))->FromString("ColorDiagonalSawtooth8");
// Acquire images to display the selected test pattern
// ...
// (Insert your own image grabbing routine here.
// For example, the InstantCamera class provides the StartGrabbing method.)
// Select the Gray Diagonal Sawtooth test pattern
camera.Parameters[PLCamera.TestPattern].SetValue(PLCamera.TestPattern.GreyDiagonalSawtooth8);
// Select the Color Diagonal Sawtooth test pattern
camera.Parameters[PLCamera.TestPattern].SetValue(PLCamera.TestPattern.ColorDiagonalSawtooth8);
// Acquire images to display the selected test pattern
// ...
// (Insert your own image grabbing routine here.
// For example, the InstantCamera class provides the StartGrabbing method.)
// Select the Gray Diagonal Sawtooth test pattern
Pylon.DeviceFeatureFromString(hdev, "TestPattern", "GreyDiagonalSawtooth8");
// Select the Color Diagonal Sawtooth test pattern
Pylon.DeviceFeatureFromString(hdev, "TestPattern", "ColorDiagonalSawtooth8");
// Acquire images to display the selected test pattern
// ...
// (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 the Gray Diagonal Sawtooth test pattern */
errRes = PylonDeviceFeatureFromString(hdev, "TestPattern", "GreyDiagonalSawtooth8");
CHECK(errRes);
/* Select the Color Diagonal Sawtooth test pattern */
errRes = PylonDeviceFeatureFromString(hdev, "TestPattern", "ColorDiagonalSawtooth8");
CHECK(errRes);
/* Acquire images to display the selected test pattern */
/* ... */
/* (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.