estimate_noise_sigma
Note
This page is a reference documentation. It only explains the function signature, and not how to use it. Please refer to the Habitat Guide and Python API guide (v2.0) for usage.
- estimate_noise_sigma(array: ndarray, mask: ndarray | None = None, method: str = 'chang') float[source]
Estimate the Gaussian noise level of an image.
- Parameters:
array – Image voxel array in
(z, y, x)order.mask – Optional ROI selector; only used by
method="roi_std".method –
"chang"– wavelet estimator (median absolute coefficient of the finest high-high subband of a coif1 transform, divided by 0.6754, the normal-consistency constant), applied on the last two axes (in-plane for axial acquisitions). This is the estimator MIRP uses when no noise level is given."roi_std"– standard deviation of the intensities insidemask(or of the whole array when no mask is given), the alternative named in the paper.
- Returns:
The estimated noise standard deviation in intensity units;
0.0for a constant image.- Raises:
ValueError – For an unknown method, arrays with fewer than two axes (
chang), or an emptyroi_stdmask.ImportError – If
method="chang"and PyWavelets is not installed.