简体   繁体   中英

Enhance image by simple interpolation using matlab

I'm working on some tomography and is trying to enhance the quality of my data. You can see the raw data here: http://i.imgur.com/270HT.png . What I want to do is to smooth the image along the X-direction. Basically stretching the image and interpolate the data in between the discrete jumps.

I don't know a lot about image processing, but to my naked eye I can see that matlabs built-in imresize and interp2 function don't do a very good job.

Can someone please help me how to enhance this?

I'm not sure whether a usual interpolation is right here. It seems that your image was created from separate column-measurements. If you look at your data it seems that neighboring columns are almost copies of each other. They seem just a bit translated. If you take the brightness of two neighboring columns and plot it, you see

在此输入图像描述

that for the two peaks, which are vessel-like structures in your image, this seems really the case. So what about calculating the correlation of two neighboring columns to get the offset

在此输入图像描述

You see that the two columns correlate the most if they are shifted by a few pixel.

So here is what I would try first. Calculate the offset of each neighboring column. You get a list of offsets which tells you how much you have to translate a line to make it the best match with its neighbor. Then you smooth this list and use the smoothed version to translate every column. This should repair columns like the one at x=7 in your raw image.

Furthermore, you could of course stretch your image in x-direction by interpolating this list of offsets. Say you have 10 neighboring columns and their offsets, where they match the most.

在此输入图像描述

Then you could use the intermediate steps by using the same line with different translations. In this way you would get a smooth transition from column to column and you would resize the x-direction.

在此输入图像描述

Edit

This

Then you smooth this list and use the smoothed version to translate every column. This should repair columns like the one at x=7 in your raw image.

needs clarification. When you have the list of offsets, what you want to use for the translation of each column is the difference between this list and its smoothed version. I hope I'm right here, because I didn't try it.

You can use different styles of imresize -> For example putting 'lanczos3' as optional argument. (See the manual for this one). You can also try to sharpen the image after resizing, if you like it more. However, you will never get something really good, as an interpolation is always a creation of data out of nowhere.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM