pingwyn.remove_artefacts
- pingwyn.remove_artefacts(image_trace, image_retrace, threshold=5.0)
Remove a variety of scanning artefacts using FFT based feature detection. This function is based on Laurens Westenberg’s artefact removal code version 4, dated 2025-09-18.
Noise is detected by considering the similarities between the FFTs of the trace and retrace images, as well as features that lie along symmetry planes in the trace and retrace FFT images separately.
The returned image is an average of the cleaned trace and retrace images. The individual images are cleaned by blending between the input image and a denoised image based on the local noise strength.
- Parameters:
image_trace (pingwyn.Image) – Trace image to remove artifacts from.
image_retrace (pingwyn.Image) – Retrace image corresponding to image_trace.
threshold (float) – Threshold for selecting the minimum ratio between trace/retrace and symmetry planes to be considered as noise. Default: 5.0
- Returns:
The cleanded up composite image.
- Return type:
See also
pingwyn.remove_planePerform image plane removal / flattening
pingwyn.align_rowsPerform image row alignment