Fix the bad results of unsupervised deconvolution.

The initial implementation was simplified to reduce the number of
local variable. Consequently the parameter data.size was wrong. It was
the size of the fourier spectrum, with hermitian property, instead of
the real space size. This should work.

In addition the PSF is now normalized.
This commit is contained in:
François Orieux
2013-12-10 22:45:10 +01:00
parent 4b233098e7
commit 7042d778e6
4 changed files with 7 additions and 6 deletions
@@ -8,7 +8,7 @@ test_img = camera().astype(np.float)
def test_wiener():
psf = np.ones((5, 5))
psf = np.ones((5, 5)) / 25
data = convolve2d(test_img, psf, 'same')
np.random.seed(0)
data += 0.1 * data.std() * np.random.standard_normal(data.shape)
@@ -19,7 +19,7 @@ def test_wiener():
def test_unsupervised_wiener():
psf = np.ones((5, 5))
psf = np.ones((5, 5)) / 25
data = convolve2d(test_img, psf, 'same')
np.random.seed(0)
data += 0.1 * data.std() * np.random.standard_normal(data.shape)