Motion Blur removal

Discuss digital image processing techniques and algorithms. We encourage its application to ImageMagick but you can discuss any software solutions here.
pdaraja
Posts: 28
Joined: 2016-10-31T04:20:19-07:00
Authentication code: 1151

Motion Blur removal

Post by pdaraja » 2016-10-31T04:31:34-07:00

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.

User avatar
fmw42
Posts: 22105
Joined: 2007-07-02T17:14:51-07:00
Location: Sunnyvale, California, USA

Re: Motion Blur removal

Post by fmw42 » 2016-10-31T09:43:03-07:00

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

pdaraja
Posts: 28
Joined: 2016-10-31T04:20:19-07:00
Authentication code: 1151

Re: Motion Blur removal

Post by pdaraja » 2016-11-02T21:28:51-07:00

can you please send me the Matlab code for blur kernel estimation of blurred image.

pdaraja
Posts: 28
Joined: 2016-10-31T04:20:19-07:00
Authentication code: 1151

Re: Motion Blur removal

Post by pdaraja » 2016-11-02T23:19:10-07:00

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).

User avatar
fmw42
Posts: 22105
Joined: 2007-07-02T17:14:51-07:00
Location: Sunnyvale, California, USA

Re: Motion Blur removal

Post by fmw42 » 2016-11-02T23:57:49-07:00

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.

pdaraja
Posts: 28
Joined: 2016-10-31T04:20:19-07:00
Authentication code: 1151

Re: Motion Blur removal

Post by pdaraja » 2016-11-02T23:58:21-07:00

i have tried. but it wil not run in the windows platform..

User avatar
fmw42
Posts: 22105
Joined: 2007-07-02T17:14:51-07:00
Location: Sunnyvale, California, USA

Re: Motion Blur removal

Post by fmw42 » 2016-11-02T23:59:40-07:00

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.

User avatar
fmw42
Posts: 22105
Joined: 2007-07-02T17:14:51-07:00
Location: Sunnyvale, California, USA

Re: Motion Blur removal

Post by fmw42 » 2016-11-03T00:01:26-07:00

Perhaps you should inquire about the cepstrum concept on a Matlab forum.

pdaraja
Posts: 28
Joined: 2016-10-31T04:20:19-07:00
Authentication code: 1151

Re: Motion Blur removal

Post by pdaraja » 2016-11-03T00:02:21-07:00

ok thank you for your support...

User avatar
fmw42
Posts: 22105
Joined: 2007-07-02T17:14:51-07:00
Location: Sunnyvale, California, USA

Re: Motion Blur removal

Post by fmw42 » 2016-11-03T00:11:12-07:00

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.


User avatar
fmw42
Posts: 22105
Joined: 2007-07-02T17:14:51-07:00
Location: Sunnyvale, California, USA

Re: Motion Blur removal

Post by fmw42 » 2016-11-03T10:26:49-07:00

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.

pdaraja
Posts: 28
Joined: 2016-10-31T04:20:19-07:00
Authentication code: 1151

Re: Motion Blur removal

Post by pdaraja » 2016-11-03T21:39:50-07:00

did you try two images..

pdaraja
Posts: 28
Joined: 2016-10-31T04:20:19-07:00
Authentication code: 1151

Re: Motion Blur removal

Post by pdaraja » 2016-11-03T21:41:57-07:00

the second image is having linear motion blur...i have created a artificial motion blur with length 10 and orientation 45.

User avatar
fmw42
Posts: 22105
Joined: 2007-07-02T17:14:51-07:00
Location: Sunnyvale, California, USA

Re: Motion Blur removal

Post by fmw42 » 2016-11-03T22:10:53-07:00

No, I only tried the one image (1.png). I will try the other tomorrow.

Post Reply