priors.nlmeans#
- bartorch.priors.nlmeans()#
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, default=None) – Odd patch length per axis; BART’s default is 5.
patch_distance (int, default=None) – Search radius per axis; BART’s default is 5. Zero returns
input.h (float, default=None) – Filter strength in the units of
input’s values; BART’s default is 0.04. A largehmakes the filter a box mean.a (float, default=None) – Standard deviation of
g, in voxels; BART’s default is(patch_length - 1) / 4.