adaptive_gaussian
- eolab.georastertools.processing.algo.adaptive_gaussian(input_data: ndarray, kernel_size: int = 8, sigma: int = 1) ndarray[source]
Applies an Adaptive Gaussian Filter to the input data that smoothes the input while preserving edges.
- Parameters:
input_data (np.ndarray) – A 3D numpy array of shape (1, number_of_lines, number_of_columns) containing the Digital Elevation Model (DEM). The function only accepts arrays with one band.
kernel_size (int) – The size of the kernel used for the adaptive filtering. Default is 8.
sigma (int) – The standard deviation of the Gaussian distribution, which controls the level of smoothing. Default is 1.
- Returns:
A numpy array of the same shape as input_data, containing the filtered data.
- Return type:
np.ndarray
- Raises:
ValueError – If input_data does not have 3 dimensions or if the first dimension is not of size 1.