In this topic Hide
Images output by some cameras may display artifacts resembling a superimposed checker pattern. This is due to the specific sensor design. Any 2 x 2 pixels in the sensor array respond identically to light only if its incidence is perpendicular to the sensor’s surface. If the light arrives at an oblique angle, they will respond slightly differently. This causes the checker pattern in the image.
You can suppress the checker pattern by ensuring that appropriate correction coefficients are applied to the original pixel values. Correction coefficients are automatically applied at each image acquisition.
Pattern Removal Auto allows you to ensure that the values of the correction coefficients are appropriate for each image acquisition. The values are only effective under the specific imaging conditions that were present when Pattern Removal Auto was used.
The Pattern Removal Auto auto function differs in some respects from other auto functions:
To use the Pattern Removal Auto auto function:
The generated correction values apply until one of the following events occurs:
Repeating the Pattern Removal Auto Process
When one of the relevant imaging conditions changes, you should repeat the Pattern Removal Auto process. This ensures that the checker pattern is still removed reliably under the changed conditions and that pixel values are not changed unnecessarily.
Among the relevant imaging conditions are the following:
Correction values generated by the Pattern Removal Auto auto function are lost if the camera is disconnected from power.
However, you can save the correction values in a user set. You can load this user set whenever you want to use the correction values again.
When loading correction values, make sure that the imaging conditions are identical to those when the correction values were generated.
// Set the operating mode of the Pattern Removal Auto auto function to Once
camera.PatternRemovalAuto.SetValue(PatternRemovalAuto_Once);
// Acquire three images
// ...
// (Implement your own image grabbing routine here.
// For example, the InstantCamera class provides the StartGrabbing() method.)
// ...
// Save the correction values in User Set 1
camera.UserSetSelector.SetValue(UserSetSelector_UserSet1);
camera.UserSetSave.Execute();
INodeMap& nodemap = camera.GetNodeMap();
// Set the operating mode of the Pattern Removal Auto auto function to Once
CEnumerationPtr(nodemap.GetNode("PatternRemovalAuto"))->FromString("Once");
// Acquire three images
// ...
// (Implement your own image grabbing routine here.
// For example, the InstantCamera class provides the StartGrabbing() method.)
// ...
// Save the correction values in User Set 1
CEnumerationPtr(nodemap.GetNode("UserSetSelector"))->FromString("UserSet1");
CCommandPtr(nodemap.GetNode("UserSetSave"))->Execute();
// Set the operating mode of the Pattern Removal Auto auto function to Once
camera.Parameters[PLCamera.PatternRemovalAuto].SetValue(PLCamera.PatternRemovalAuto.Once);
// Acquire three images
// ...
// (Implement your own image grabbing routine here.
// For example, the InstantCamera class provides the StartGrabbing() method.)
// ...
// Save the correction values in User Set 1
camera.Parameters[PLCamera.UserSetSelector].SetValue(PLCamera.UserSetSelector.UserSet1);
camera.Parameters[PLCamera.UserSetSave].Execute();
// Set the operating mode of the Pattern Removal Auto auto function to Once
Pylon.DeviceFeatureFromString(hdev, "PatternRemovalAuto", "Once");
// Acquire three images
// ...
// (Implement your own image grabbing routine here.
// For example, the InstantCamera class provides the StartGrabbing() method.)
// ...
// Save the correction values in User Set 1
Pylon.DeviceFeatureFromString(hdev, "UserSetSelector", "UserSet1");
Pylon.DeviceExecuteCommandFeature(hdev, "UserSetSave");
/* 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 */
/* Set the operating mode of the Pattern Removal Auto auto function to Once */
errRes = PylonDeviceFeatureFromString(hdev, "PatternRemovalAuto", "Once");
CHECK(errRes);
/* Acquire three images */
/* ... */
/* (Implement your own image grabbing routine here. */
/* For example, the InstantCamera class provides the StartGrabbing() method.) */
/* ... */
/* Save the correction values in User Set 1 */
errRes = PylonDeviceFeatureFromString(hdev, "UserSetSelector", "UserSet1");
CHECK(errRes);
errRes = PylonDeviceExecuteCommandFeature(hdev, "UserSetSave");
CHECK(errRes);
You can also use the pylon Viewer to easily set the parameters.