Deblur image that has locally varying (but well known) motion blur
Ältere Kommentare anzeigen
Hi, I have an image where motion blur occurs due to long exposure photographing. I know the amount of motion blur for each pixel of the image. Is there a way to de-motion-blur this image with a locally varying de-blur algorithm?
I have attached images that show the original, motion-blurred image, and the x and y blur amount (in pixel units). The original Matlab data is located here:
Should I segement the image into smaller sub-images and then deblur each sub-image? Isn't there a nicer way...? Could you give me a hint where I can start? Thanks!!
William



p.s.: The dataset is not perfect as there are additional sources of image blurring too (caused by lens misalignment, lower left corner for example). But this is the best dataset I currently have.
Antworten (3)
Bjorn Gustavsson
am 4 Apr. 2022
0 Stimmen
Some time ago I wrote a pair of simple "variable-psf-blurring and variable-psf-deblurring" functions. They at least work OK-ish for the case where the psf-s are nearly separable into a pair of horizontal and vertical psf-s that varies smoothly over the image. For this type of task you might have to go to the litterature, or do it region-by-region from scratch. For what it is worth, I attach the varying-psf-tools.
HTH
William Thielicke
am 4 Apr. 2022
4 Kommentare
Bjorn Gustavsson
am 4 Apr. 2022
Yeah, I didn't have time to look at your image, so I was hoping that your "other problems" weren't too bad, and that my quick-and-easy-toy would get the job done. No I have taken a very QD-look at your image, it seems that the motion-blurring is not the dominant problem. To my eyes it seems like you have rather uggly case of astigmatic aberations that dominate (?) at least the left region of the image. For such psf-s their variation across the image has to be taken into account, but unfortunately they look like seaguls (at least to me that was the first association I got first time looking at them). For that I think you'll have the most success by dividing the image into small enough regions, and then estimate the psf by selecting a few isolated sources (stars?) and scale those to unit total intensity and use them in the Lucy-Richardson-deconvolution. Perhaps have a reasonably large overlap between regions too.
William Thielicke
am 4 Apr. 2022
Bjorn Gustavsson
am 5 Apr. 2022
Doesn't your or any of the other PIV-tools on the file exchange handle this type of problem? Are you really happy with the motion-blurring filters produced by fspecial? When I displayed them for each 15-by-15 block they looked rather peculiar to me. Does your particles move parallel enough to the image plane for that simplistic motion-blur to be valid? Is it worthwhile to try to solve this problem on images with this aberration-limited focus?
William Thielicke
am 6 Apr. 2022
Image Analyst
am 6 Apr. 2022
0 Stimmen
You might want to try BM3D. In addition to being arguably the best denoising algorithm out there, it also does deblurring. Here is an example:

The original is on the left. The blurred input image is in the middle, and the deblurred/repaired image is on the right. It looks almost like the original. You can get the MATLAB code here:
Alternatively you could try a Mean Shift Filter, a total variance deblurring, or others. Many are in the File Exchange:
Try some of them and see what works well for you. Such as
Kategorien
Mehr zu Programming finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!