[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #57053] [octave forge] (image 2.10.0) possible

From: Jean-Yves Bernier
Subject: [Octave-bug-tracker] [bug #57053] [octave forge] (image 2.10.0) possible deconvwnr regression
Date: Mon, 21 Oct 2019 05:05:23 -0400 (EDT)
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:56.0) Gecko/20100101 Firefox/56.0

Follow-up Comment #5, bug #57053 (project octave):

1/ Converting to double certainly does better.

2/ Vertical stripes go away when I add the "circular" option to imfilter

Revised example:

clear all;

I = imread("http://www.hlevkin.com/TestImages/cameraman.bmp";);
I = im2double(I);

psf = fspecial ("motion", 30, 15);
blurred = imfilter (I, psf, "circular", "conv");

var_noise = 0.0005;
blurred_noisy = imnoise (blurred, "gaussian", 0, var_noise);

estimated_nsr = var_noise / (var(blurred_noisy(:)) - var_noise)
J = deconvwnr (blurred_noisy, psf, estimated_nsr);

figure; clf;

subplot(2,2,1); imshow (I);
title ("Original image");

subplot(2,2,2); imshow (blurred);
title ("Image with added motion blur");

subplot(2,2,3); imshow (blurred_noisy)
title ({"Image with motion blur", "and added Gaussian noise"});

subplot(2,2,4); imshow (J)
title ({"restored image after Wiener deconvolution",
           "with known PSF and estimated NSR"});

See picture "revised_example.jpg".

As for comparing the code i was using before and your implementation, here is
a couple of identity test (convolve then deconvolve with same psf) for both
gaussian and motion blur : wiener_compare.jpg

Your implementation is obviously superior with no artifacts.

So that's a yes for closing.


About deconvblind : yes I have one and forgot it was in user library. I'm not
sure about the license.

(file #47726, file #47727)

Additional Item Attachment:

File name: revised_example.jpg            Size:85 KB

File name: wiener_compare.jpg             Size:80 KB


Reply to this item at:


  Message sent via Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]