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
Depending on your camera model, the following test patterns are available:
Completely black test pattern.
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 |
|
All dart BCON for MIPI cameras models |
|
All dart USB 3.0 camera models |
|
All pulse USB 3.0 camera models |
|
// 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.