Apply anisotropic diffusion processing to enhance image details.
Anisotropic diffusion is a multi-scale image processing technique that
selectively smooths regions while preserving edges by using spatially
varying diffusion coefficients. This implementation uses wavelet-based
anisotropic diffusion with configurable anisotropy parameters to control
how different frequency components diffuse relative to their gradients.
The diffusion process works by:
- Applying multiple iterations of gradient-based diffusion
- Using different diffusion speeds for low and high frequency wavelets
- Controlling diffusion direction via anisotropy parameters
- Regularizing coefficients to detect and preserve edges
- Modulating response to low-variance regions via variance threshold
Definition at line 34 of file _local_contrast.py.
| FloatImagePlane lsst.pipe.tasks.prettyPictureMaker._functors._local_contrast.DiffusionFunction.__call__ |
( |
| self, |
|
|
FloatImagePlane | intensities ) |
Apply anisotropic diffusion to the input intensity image.
Parameters
----------
intensities : `FloatImagePlane`
The input intensity image to process.
Returns
-------
result : `FloatImagePlane`
The diffused intensity image with enhanced details.
Notes
-----
This method implements wavelet-based anisotropic diffusion:
1. Multi-scale decomposition: The image is analyzed across multiple
frequency bands using wavelet decomposition.
2. Directional diffusion: Low-frequency wavelets diffuse according to
their own gradient orientation (anisotropy_first) and high-frequency
gradients (anisotropy_second). High-frequency wavelets diffuse
relative to low-frequency gradients (anisotropy_third) and their
own gradients (anisotropy_fourth).
3. Speed control: Diffusion speeds are configured via `first`, `second`,
`third`, and `fourth` parameters for each anisotropy axis.
4. Edge preservation: Regularization prevents diffusion across edges.
Variance threshold modulates response to smooth regions.
5. Scale selection: `radius_center` and `radius` define which scales
are modified, enabling targeted enhancement or denoising.
The diffusion equation is solved iteratively for `iterations` steps,
with the `sharpness` parameter adjusting final detail amplitudes.
Definition at line 100 of file _local_contrast.py.