lsst.pipe.tasks geda066a9bb+d0de8bc8db
Loading...
Searching...
No Matches
lsst.pipe.tasks.prettyPictureMaker._functors._local_contrast.DiffusionFunction Class Reference
Inheritance diagram for lsst.pipe.tasks.prettyPictureMaker._functors._local_contrast.DiffusionFunction:

Public Member Functions

FloatImagePlane __call__ (self, FloatImagePlane intensities)
 

Static Public Attributes

 iterations = Field[int]("number of interations in the diffusion process", default=3)
 
 anisotropy_first
 
 anisotropy_second
 
 anisotropy_third
 
 anisotropy_fourth
 
 regularization = Field[float]("Regularization of coefficients used to detect edges", default=2.94)
 
 variance_threshold
 
 radius_center
 
 radius
 
 first = Field[float](doc="Anisotropic diffusion speed of low-frequency wavelets", default=0.0065)
 
 second
 
 third
 
 fourth
 
 sharpness
 

Detailed Description

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.

Member Function Documentation

◆ __call__()

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.

Member Data Documentation

◆ anisotropy_first

lsst.pipe.tasks.prettyPictureMaker._functors._local_contrast.DiffusionFunction.anisotropy_first
static
Initial value:
= Field[float](
"The diffusion direction of low-frequency wavelets relative to their own gradient orientation",
default=1,
)

Definition at line 52 of file _local_contrast.py.

◆ anisotropy_fourth

lsst.pipe.tasks.prettyPictureMaker._functors._local_contrast.DiffusionFunction.anisotropy_fourth
static
Initial value:
= Field[float](
"The diffusion direction of high-frequency wavelets relative to their own gradient orientation",
default=1,
)

Definition at line 64 of file _local_contrast.py.

◆ anisotropy_second

lsst.pipe.tasks.prettyPictureMaker._functors._local_contrast.DiffusionFunction.anisotropy_second
static
Initial value:
= Field[float](
"The diffusion direction of low-frequency wavelets relative to the high-frequency gradient.",
default=1,
)

Definition at line 56 of file _local_contrast.py.

◆ anisotropy_third

lsst.pipe.tasks.prettyPictureMaker._functors._local_contrast.DiffusionFunction.anisotropy_third
static
Initial value:
= Field[float](
"The diffusion direction of high-frequency wavelets relative to the low-frequency gradient.",
default=1,
)

Definition at line 60 of file _local_contrast.py.

◆ first

lsst.pipe.tasks.prettyPictureMaker._functors._local_contrast.DiffusionFunction.first = Field[float](doc="Anisotropic diffusion speed of low-frequency wavelets", default=0.0065)
static

Definition at line 86 of file _local_contrast.py.

◆ fourth

lsst.pipe.tasks.prettyPictureMaker._functors._local_contrast.DiffusionFunction.fourth
static
Initial value:
= Field[float](
doc="High-frequency wavelet diffusion speed along the 4th-order anisotropy axis.", default=-0.2774
)

Definition at line 93 of file _local_contrast.py.

◆ iterations

lsst.pipe.tasks.prettyPictureMaker._functors._local_contrast.DiffusionFunction.iterations = Field[int]("number of interations in the diffusion process", default=3)
static

Definition at line 51 of file _local_contrast.py.

◆ radius

lsst.pipe.tasks.prettyPictureMaker._functors._local_contrast.DiffusionFunction.radius
static
Initial value:
= Field[float](
doc="The diffusion span defines a radial band (center ± span) for detail modification.", default=5.0
)

Definition at line 83 of file _local_contrast.py.

◆ radius_center

lsst.pipe.tasks.prettyPictureMaker._functors._local_contrast.DiffusionFunction.radius_center
static
Initial value:
= Field[float](
doc=(
"The diffusion scale parameter: zero diffuses fine details (deblurring/denoising), "
"while non-zero values selectively diffuse larger scales to enhance local contrast."
),
default=0.0,
)

Definition at line 76 of file _local_contrast.py.

◆ regularization

lsst.pipe.tasks.prettyPictureMaker._functors._local_contrast.DiffusionFunction.regularization = Field[float]("Regularization of coefficients used to detect edges", default=2.94)
static

Definition at line 68 of file _local_contrast.py.

◆ second

lsst.pipe.tasks.prettyPictureMaker._functors._local_contrast.DiffusionFunction.second
static
Initial value:
= Field[float](
doc="Low-frequency wavelet diffusion speed along the 2nd-order anisotropy axis", default=-0.25
)

Definition at line 87 of file _local_contrast.py.

◆ sharpness

lsst.pipe.tasks.prettyPictureMaker._functors._local_contrast.DiffusionFunction.sharpness
static
Initial value:
= Field[float](
doc="Adjusts wavelet detail amplitude. Positive values sharpen, negative values blur.", default=0.0
)

Definition at line 96 of file _local_contrast.py.

◆ third

lsst.pipe.tasks.prettyPictureMaker._functors._local_contrast.DiffusionFunction.third
static
Initial value:
= Field[float](
doc="High-frequency wavelet diffusion speed along the 3rd-order anisotropy axis", default=-0.25
)

Definition at line 90 of file _local_contrast.py.

◆ variance_threshold

lsst.pipe.tasks.prettyPictureMaker._functors._local_contrast.DiffusionFunction.variance_threshold
static
Initial value:
= Field[float](
doc=(
"The variance threshold modulates the filter's response to low-variance regions, with positive "
" values enhancing local contrast and negative values suppressing noise and blur in those areas"
),
default=0.0,
)

Definition at line 69 of file _local_contrast.py.


The documentation for this class was generated from the following file: