How can I deconvolute image data?

Hi experts,
i have a question concerning the topic deconvolution in MATLAB with the Image Processing Toolbox.
As a result of a test bench I have the two-dimensional distribution of the force of a fluid flux. This distribution is captured with a measuring pin which is guided through the fluid perpendicular to the flux. In this way I gain a pseudocolor image of the force 2D-distribution.
The problem is now that by scanning the fluid (cross section about 5 mm) with the measuring pin (which has a diameter of 1 mm) the gained distribution is broadened respectively blurred in relation to the real distribution. For me it is a problem concerning deconvolution to gain the real profile out of the measured profile.
Enclosed a image which represents my ideas to the problem in 1D: Link: http://i.imgur.com/tehUhSQ.jpg You can see that the measured profile is broader than the real profile because of scanning with the measuring pin of finite diameter. In my opinion the pin can be described as a rectangular function in this case.
In the Image Processing Toolbox I´ve found the features deconv and deconvreg for deconvolution of data. At the moment I have managed to convolute/deconvolute two functions with each other by conv/deconv, but only in 1D. I think the key to my problem for 2D-dimensional problems is the deconvreg-function with the PSF, but I don´t know how to transfer my problem to this function.
It would be very helpful if you, experts, have some hint for me to better understand how to use the features mentioned above for my problem. Or if this problem could be solved in an easier way.
Thanks a lot, Joo

 Accepted Answer

Image Analyst
Image Analyst on 13 Apr 2013
Edited: Image Analyst on 13 Apr 2013
Try deconvlucy() and try some different PSFs until you get one that produces an image that is sharp enough for you to continue your analysis.

11 Comments

Thanks Image Analyst for your very fast answer!
Ok, there is indeed another deconvolution feature named deconvlucy with is using the Richardson-method. I think this method was used for the problems with the hubble telescope some time ago. What is the advantage to use this method in my problem instead of deconvreg?
But I´m content when you say that I´m on the right track with the deconv-features plus PSF in general to solve my problem. I wasn´t sure about this before.
Image Analyst
Image Analyst on 13 Apr 2013
Edited: Image Analyst on 13 Apr 2013
That's a good question that I don't know the answer to off the top of my head. I don't really need to deblur noisy images. The description for deconvlucy and deconvreg inthe MATLAB documentation sound practically the same. Actually they sound a lot like what the Wiener (or Wiener Helstrom) filter does. I'm not sure of the relative advantages and disadvantages of the various methods. I'd have to do some research (which I'll let you do, if you are interested enough to follow up on). Write back if you find out.
Ok, thanks for your answer Image Analyst. Reading the MATLAB documentation I can´t find any difference, too. Yes, you´re right, I will generate some code in MATLAB and test if the method with deblurring my image by using the deconvlucy/deconvreg function is working properly. I will give you feedback about my progress.
Hello, short feedback from my side concerning the deconvolution problem. How you have suggested I tried the deconvlucy feature. I generated the PSF using the fspecial command with the option 'disk' in order to describe my round measuring needle with this 2D-filter. After a few trials it worked perfectly to deconvolute the image data and to subtract out the influence of the needle on the measurement. Thanks a lot, Image Analyst, for this advice! Best greetings, Joo
You're welcome, glad I could help Joo.
Hi I have guessed the inverse filter(H) but when I do deconvolution for noisy image and the filter, the output is a black image.(output_im_fft=noisy_im_fft./H) I also use iff2 and matlab orders for deconvolution like deconvlucy() (for noisy_im & h), but i didn't get any result. Is there any other way for deconvolution , so that I will be able to get the fine image??
I don't know what the "fine" image is.
I meant the image without noise(filtered image). As i mentioned i get a completely black image after deconvolution. but it is not correct.
Have you checked the values in the variable editor to see if they really are all pure zero?
Or did you forget to use [] when you called imshow()?
yeah i check it. H is defining as this : d=pi*(u+v); H=(sin(d).*exp(-1i*d))./d; u & v are variables in frequency domain. And as you said H matrix arrays are not all oure zero.
Completely black images typically indicate that you either calculated in an integer data type when you should have calculated in floating point, or else that you calculated in floating point and did not correctly convert back to integer. But when fft*() is involved it can also hint that you might have ended up with imaginary components due to not properly handling the filtering on the conjugate symmetric coefficients you get from fft*() of real-valued systems.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!