lsst.pipe.tasks gcf790cdeb6+e07a3617c0
Loading...
Searching...
No Matches
lsst.pipe.tasks.prettyPictureMaker._equalizers Namespace Reference

Functions

NDArray _eigf_variance_analysis_no_mask (FloatImagePlane guide, float sigma)
 
None _eigf_blending_no_mask (FloatImagePlane image, NDArray av, float feathering, int filter_type)
 
None _fast_eigf_surface_blur (FloatImagePlane image, float sigma, float feathering, int iterations=1, int filter_type=1)
 
FloatImagePlane tone_equalizer (FloatImagePlane image, list[float] tone_factors, float weight, float sigma, float feathering, int iterations=1, int filter_type=1)
 
FloatImagePlane contrast_equalizer (FloatImagePlane image, list[float] contrast_factors)
 

Function Documentation

◆ _eigf_blending_no_mask()

None lsst.pipe.tasks.prettyPictureMaker._equalizers._eigf_blending_no_mask ( FloatImagePlane image,
NDArray av,
float feathering,
int filter_type )
protected
Applies blending without a mask using averages and variances.

Parameters
----------
image : `FloatImagePlane`
    2D input image array. Modified in-place.
av : `numpy.ndarray`
    Array with shape (height, width, 2) containing averages and variances.
feathering : `float`
    Feathering parameter for blending.
filter_type : `int`
    Blending type: 0 for linear, 1 for geometric mean.

Definition at line 65 of file _equalizers.py.

◆ _eigf_variance_analysis_no_mask()

NDArray lsst.pipe.tasks.prettyPictureMaker._equalizers._eigf_variance_analysis_no_mask ( FloatImagePlane guide,
float sigma )
protected
Computes average and variance of guide using Gaussian filtering.

Parameters
----------
guide : `FloatImagePlane`
    2D array representing the guide image.
sigma : `float`
    Standard deviation for Gaussian kernel.

Returns
-------
result : `numpy.ndarray`
    Array where each pixel has [average, variance].

Definition at line 34 of file _equalizers.py.

◆ _fast_eigf_surface_blur()

None lsst.pipe.tasks.prettyPictureMaker._equalizers._fast_eigf_surface_blur ( FloatImagePlane image,
float sigma,
float feathering,
int iterations = 1,
int filter_type = 1 )
protected
Applies exposure-independent guided blur with down-scaling and up-sampling.

Parameters
----------
image : `FloatImagePlane`
    Input image array of shape (height, width). Modified in-place.
sigma : `float`
    Standard deviation for Gaussian kernel.
feathering : `float`
    Feathering parameter.
iterations : `int`, optional
    Number of iterations to model diffusion. Default is 1.
filter_type : `int`, optional
    Blending type: 0 for linear, 1 for geometric mean. Default is 1.

Definition at line 99 of file _equalizers.py.

◆ contrast_equalizer()

FloatImagePlane lsst.pipe.tasks.prettyPictureMaker._equalizers.contrast_equalizer ( FloatImagePlane image,
list[float] contrast_factors )
Enhance image contrast using Laplacian pyramid adjustment.

This function performs contrast equalization by modifying the Laplacian
pyramid coefficients of the input image. Each level of the pyramid
corresponds to a different spatial scale, allowing for scale-dependent
contrast adjustments. A padded copy of the input image is created for
processing.

Parameters
----------
image : `FloatImagePlane`
    Input image array of shape (height, width).
contrast_factors : `list` of `float`
    List of factors to multiply each pyramid level. Values > 1 increase
    contrast, values < 1 decrease contrast. The list should specify
    factors for the largest scales first; unspecified levels use a factor
    of 1.0.

Returns
-------
result : `FloatImagePlane`
    Image with contrast adjusted at multiple spatial scales.

Definition at line 175 of file _equalizers.py.

◆ tone_equalizer()

FloatImagePlane lsst.pipe.tasks.prettyPictureMaker._equalizers.tone_equalizer ( FloatImagePlane image,
list[float] tone_factors,
float weight,
float sigma,
float feathering,
int iterations = 1,
int filter_type = 1 )
Enhance image brightness using exposure-dependent correction.

This function adjusts image brightness by applying exposure-dependent
corrections based on tone factors. It uses exposure centers spanning from
0 to 1 (10 levels) and applies Gaussian-weighted adjustments using edge
informed guided filters. A copy of the input image is made before processing.

Parameters
----------
image : `FloatImagePlane`
    Input image array of shape (height, width).
tone_factors : `list` of `float`
    List of 10 tone correction factors, one for each exposure level.
weight : `float`
    Width of the Gaussian kernel for exposure weighting.
sigma : `float`
    Standard deviation for Gaussian blur of luminance.
feathering : `float`
    Feathering parameter for exposure-independent guided blur.
iterations : `int`, optional
    Number of iterations for the blur process. Default is 1.
filter_type : `int`, optional
    Blending type: 0 for linear, 1 for geometric mean. Default is 1.

Returns
-------
result : `FloatImagePlane`
    Image with brightness adjusted based on tone factors.

Definition at line 127 of file _equalizers.py.