mirror of
https://github.com/wassname/scikit-image.git
synced 2026-08-05 13:21:12 +08:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user