Image enhancement through simple interpolation using Matlab

I work on some tomography and try to improve the quality of my data. You can see the source data here: http://i.imgur.com/270HT.png . What I want to do is smooth the image along the X-direction. Basically image stretching and data interpolation between discrete transitions.

I do not know much about image processing, but with the naked eye I see that the built-in imresize and interp2 in Matlabs does not do a very good job.

Can someone please help me how to improve this?

+4
source share
2 answers

I am not sure if the correct interpolation is here. It seems that your image was created from separate column dimensions. If you look at your data, it seems that the adjacent columns are almost copies of each other. They seem a bit translated. If you take the brightness of two adjacent columns and enter it into the graph, you will see

enter image description here

that for the two peaks that are the vessel-like structures in your image, this is true. So how about calculating the correlation of two adjacent columns to get the offset

enter image description here

You see that two columns are most strongly correlated if they are shifted by a few pixels.

So here is what I would like to try first. Calculate the offset of each adjacent column. You get a list of offsets that tells you how much you should translate the line to make it the best with your neighbor. Then you smooth the list and use the smoothed version to translate each column. This should restore columns like the one located at x = 7 in your original image.

Alternatively, you could stretch the image in the x-direction by interpolating this list of offsets. Let's say you have 10 adjacent columns and their offsets, where they most closely match.

enter image description here

Then you can use the intermediate steps using the same line with different translations. This way you get a smooth transition from column to column and you resize the x-direction.

enter image description here

Edit

it

Then you smooth the list and use the smoothed version to translate each column. This should restore columns like the one located at x = 7 in your original image.

clarification required. When you have a list of offsets, what you want to use to translate each column is the difference between this list and its smoothed version. I hope I am here because I have not tried.

+2
source

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

+1
source

Source: https://habr.com/ru/post/1386437/


All Articles