2

I have one base image (image1) depicting a quantity in a space for time t1. For the similar result, I have one more image (image2) for time t2 , where t2>t1.

enter image description here

The above two images are plotted in Matlab using imagesc. I want to differentiate between those two images such that it is physically intuitive. However, with those two images it's hard to see much difference between them with the naked eye. Although there is very minor change in concentration between image1 and image2, I would like to find what is the difference and show it so that it explains the physical meaning. To explain physically, the fluid would move down with time i.e. the concentration would increase in the bottom part as time passes.

For example in the following graph (even though it's not physically intuitive of the above image) each line represents the entire column values for corresponding image from above. Hence there are 100 blue and 100 red lines for image1 and image2, respectively.

enter image description here

However, I would like to know if there is a better method in Matlab to plot the difference in images from image1 to image2 which better explains the physical meaning of the change. Thanks.

  • This is interesting. Yes, you could just do `imagesc` on the difference, but that doesn't give you good directional information, just some 'this region lost concentration, this one gained'. I am very curious what the state of the art visualization techniques are. – ivancho Feb 10 '12 at 04:05
  • The images look like MATLAB figures to me. Do you have access to the data that creates them? And if so, why not use that data directly? Or am I misunderstanding something here? – Hannes Ovrén Feb 10 '12 at 10:30
  • Hi kigurai. The images are indeed plotted in Matlab using `imagesc`. I want to differentiate between those two images based on the result I obtained in form of those two figures such that it is physically intuitive. However, with those two images it's hard to see through naked eyes much difference between the two. I hope I am clear. –  Feb 11 '12 at 08:10
  • Yes, and since you have the data that made those images I think you should find a method of using the raw data to get the quantity you need, instead of using image processing tools that will most likely give you a worse result. – Hannes Ovrén Feb 13 '12 at 11:37
  • @kigurai: That's what I tried through the Matlab plot I have shown after the two images, though it's a very crude way of plotting. Basically through this question I was trying if people who already work with images have some idea of how this problem can be tackled. –  Feb 13 '12 at 12:58

2 Answers2

0

I think that you can find the border line between "blue" and "orange" by finding an appropriate threshold. Try using graythresh, your image fits the criteria of bi-modal image.

Then, you can fit a physical model to the border curve (For instance y = ax^3+bx^2+cx+d), by using polyfit or other least squares based methods.

Once you have the fits, just show them as 2 plots one on top of another one. (You can use hold on for that).

Tell me if more clarifications are required.

Andrey Rubshtein
  • 20,795
  • 11
  • 69
  • 104
  • *"Then, you can fit a physical model to the border curve (For instance y = ax^3+bx^2+cx+d), by using polyfit or other least squares based methods."* How do I do that? I just have data of the complete figure, but I do not explicitly know the border curve other than visual form. –  Feb 15 '12 at 02:45
0

This is what I did:

imagesc([1 100],[1 20],image2>image1)