bartorch.prox.nlmeans#
- bartorch.prox.nlmeans(input, axes, *, patch_length=None, patch_distance=None, h=None, a=None)#
Non-local means filter along
axes.Each voxel becomes
sum_j w_ij y_j / sum_j w_ijover thejwithinpatch_distanceof it along every axis inaxes, withw_ij = exp(-sum_o g_o |y_(i+o) - y_(j+o)|^2 / (2 h^2 ||g||_2)):oruns over a patch ofpatch_lengthper axis andgis a Gaussian of standard deviationaover it. The image is reflected at its edges.- Parameters:
patch_length (int, optional) – Odd patch length per axis (
-p); BART’s default is 5.patch_distance (int, optional) – Search radius per axis (
-d); BART’s default is 5. Zero returnsinput.h (float, optional) – Filter strength in the units of
input’s values (-H); BART’s default is 0.04. A largehmakes the filter a box mean.a (float, optional) – Standard deviation of
g, in voxels (-a); BART’s default is(patch_length - 1) / 4.