coconut_tools.magnetogram.local_weigh_filter¶
Local Weighted Smoothing Filter
Performs nonlinear weighted averaging of each pixel’s neighborhood using Gaussian-like spatial and radiometric terms. Uses parallel processing for efficiency.
Author: Jose Murteira Cleaned and modularized by: Luis
Functions
|
|
|
Apply local nonlinear averaging filter based on spatial and intensity similarity. |
|
- coconut_tools.magnetogram.local_weigh_filter.filter3(image, dx, dy, alpha, Rn, image_seq=None)[source]¶
Apply local nonlinear averaging filter based on spatial and intensity similarity.
- Parameters:
image (np.ndarray) – Input 2D image.
dx (float) – Spatial resolution in x-direction.
dy (float) – Spatial resolution in y-direction.
alpha (float) – Exponent controlling the kernel width (h = Rn^alpha).
Rn (float) – Radius of influence (neighborhood size).
image_seq (list, optional) – If provided, intermediate outputs are saved.
- Returns:
Smoothed image.
- Return type:
np.ndarray