Page 1 of 4

Motion Blur removal

Posted: 2016-10-31T04:31:34-07:00
by pdaraja
Hi all, i am working on motion blur removal in photographs. i understood the concept of deconvolution. but in that i don't know how to determine the blur kernel(Point spread function) of the blurred image. so that i can easily deconvolute the blurred image to recover it. please acknowledge me. thanks in advance.

Re: Motion Blur removal

Posted: 2016-10-31T09:43:03-07:00
by fmw42
see the cepstrum concept at http://www.fmwconcepts.com/imagemagick/ ... l#cepstrum. Also I have a script, cepstrum, for use on Unix systems (Linux, Mac OSX, Windows with Cygwin and Windows 10). See my FFT scripts at http://www.fmwconcepts.com/imagemagick/index.php

Re: Motion Blur removal

Posted: 2016-11-02T21:28:51-07:00
by pdaraja
can you please send me the Matlab code for blur kernel estimation of blurred image.

Re: Motion Blur removal

Posted: 2016-11-02T23:19:10-07:00
by pdaraja
thanks for your reply.

I have tried wiener filter as well as blind deconvolution method to deblur the image.

In the first case(wiener filter)i have given the artificial motion blurred image as a input. then i have assigned the point spread function as motion(length, direction). then there is a deconvolution output with the minimal accuracy.

In second case, i have given the same input to blind deconvolution. but here we need to specify the initial size of PSF(blur kernel.."that i don't know how to assign the size of PSF in matlab"). then after the desired iteration, it will give the average result(not clear) .

Hence i have understood that PSF is very important factor to deblur any image. can you help me how to find the blur kernel of the motion blurred image(input).

Re: Motion Blur removal

Posted: 2016-11-02T23:57:49-07:00
by fmw42
pdaraja wrote:can you please send me the Matlab code for blur kernel estimation of blurred image.
This is an imagemagick forum primarily. Most of us do not know Matlab. Some of us can help with concepts but cannot put it into Matlabl code only imagemagick.

Read my links above or look up the cepstrum concept.

Re: Motion Blur removal

Posted: 2016-11-02T23:58:21-07:00
by pdaraja
i have tried. but it wil not run in the windows platform..

Re: Motion Blur removal

Posted: 2016-11-02T23:59:40-07:00
by fmw42
Sorry, I do not know Windows scripting. You can install Cygwin on Windows and use my scripts or if you have Windows 10, you can run my scritps.

Re: Motion Blur removal

Posted: 2016-11-03T00:01:26-07:00
by fmw42
Perhaps you should inquire about the cepstrum concept on a Matlab forum.

Re: Motion Blur removal

Posted: 2016-11-03T00:02:21-07:00
by pdaraja
ok thank you for your support...

Re: Motion Blur removal

Posted: 2016-11-03T00:11:12-07:00
by fmw42
If you want to post an example image to some place such as dropbox.com and put the URL her, I can try running the cepstrum script for you. But it really only works well, if the motion blur is linear and uniform. If you have jerky motion blur or it changes rate or not uniform over the image, then you won't get a good cepstrum, nor estimate of your psf.

Re: Motion Blur removal

Posted: 2016-11-03T00:27:26-07:00
by pdaraja

Re: Motion Blur removal

Posted: 2016-11-03T10:26:49-07:00
by fmw42
Sorry, but your images do not conform to simple uniform linear motion blur. They probably have multiple motions and probably not uniform or constant rate. So the cepstrum does not show a single unique motion blur result.

Re: Motion Blur removal

Posted: 2016-11-03T21:39:50-07:00
by pdaraja
did you try two images..

Re: Motion Blur removal

Posted: 2016-11-03T21:41:57-07:00
by pdaraja
the second image is having linear motion blur...i have created a artificial motion blur with length 10 and orientation 45.

Re: Motion Blur removal

Posted: 2016-11-03T22:10:53-07:00
by fmw42
No, I only tried the one image (1.png). I will try the other tomorrow.