Multi-stage local contrast enhancement processor.
Notes
-----
This class implements a two-stage approach for enhancing image contrast:
1. **Local Contrast Enhancement**: Applies scale-space contrast enhancement
using a Laplacian pyramid approach. This adjusts highlights, shadows,
and clarity while operating on multiple resolution levels.
2. **Anisotropic Diffusion**: Optionally applies wavelet-based anisotropic
diffusion to further sharpen details and preserve edges. This stage
selectively smooths regions based on local gradient information.
The processing pipeline is configurable via parameters for both stages,
allowing fine-tuned control over the enhancement behavior.
Definition at line 153 of file _local_contrast.py.
| FloatImagePlane lsst.pipe.tasks.prettyPictureMaker._functors._local_contrast.LocalContrastEnhancer.__call__ |
( |
| self, |
|
|
FloatImagePlane | intensities ) |
Apply multi-stage contrast enhancement to the input image.
Parameters
----------
intensities : `FloatImagePlane`
The input intensity image to process.
Returns
-------
result : `FloatImagePlane`
The enhanced intensity image with improved local contrast.
Notes
-----
This method implements a two-stage enhancement pipeline:
1. **Local Contrast Enhancement** (via `localContrast`):
- Builds a Laplacian pyramid of the input image
- Applies scale-dependent contrast modifications
- Adjusts highlights and shadows via `highlights` and `shadows`
- Controls clarity and sharpness via `clarity` parameter
- Operates over `maxLevel` scales, skipping `skipLevels` lowest
- Uses `sigma` to define what is considered "local"
2. **Anisotropic Diffusion** (optional, via `diffusionFunction`):
- Applied only if `doDiffusion=True`
- Performs wavelet-based anisotropic diffusion
- Preserves edges while enhancing details
- Configurable via diffusionFunction parameters
The two stages are applied sequentially, with the diffusion stage
operating on the locally enhanced image to further refine details.
Definition at line 206 of file _local_contrast.py.