denoisingadv_6_nl_means.ipynb missing brackets
Alienor134 opened this issue · comments
Aliénor Lahlou commented
denoisingadv_6_nl_means:
It seems brackets are missing to normalise the distance by the patch area according to the distance matrix definition:
In the function distance_0 (section "Localizing the Non-local Means")
return np.sum((H2 - np.tile(H[i[0],i[1],:],(len(sel[0]),len(sel[1]),1)))**2,2)/w1*w1
should be
return np.sum((H2 - np.tile(H[i[0],i[1],:],(len(sel[0]),len(sel[1]),1)))**2,2)/(w1*w1)
to get a weight map similar to the section above