forked from guilhem_lavaux/JaxPM
minor correction to gaussian smoothing
This commit is contained in:
parent
ca5f26c93f
commit
5dc239927f
1 changed files with 1 additions and 0 deletions
|
@ -93,6 +93,7 @@ def gaussian_smoothing(im, sigma):
|
||||||
k = jnp.linalg.norm(kvec, axis=-1)
|
k = jnp.linalg.norm(kvec, axis=-1)
|
||||||
# We compute the value of the filter at frequency k
|
# We compute the value of the filter at frequency k
|
||||||
filter = norm(0, 1. / (2. * np.pi * sigma)).pdf(k)
|
filter = norm(0, 1. / (2. * np.pi * sigma)).pdf(k)
|
||||||
|
filter /= filter[0,0]
|
||||||
|
|
||||||
return jnp.fft.ifft2(jnp.fft.fft2(im) * filter).real
|
return jnp.fft.ifft2(jnp.fft.fft2(im) * filter).real
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue