如何显示两个非常相似的图像之间的变化?
我有一个基本图像(image1),描绘了时间 t1 空间中的数量。对于类似的结果,我还有一个时间 t2 的图像(image2),其中 t2>t1。
上面两个图像是使用 imagesc
在 Matlab 中绘制的。我想区分这两个图像,使其在物理上直观。然而,对于这两张图像,用肉眼很难看出它们之间有多大区别。虽然 image1 和 image2 之间的浓度变化非常小,但我想找出其中的差异并显示出来,以便它解释物理意义。从物理上解释,流体会随着时间向下移动,即底部的浓度会随着时间的推移而增加。
例如,在下图中(尽管上图在物理上并不直观),每条线代表上面相应图像的整个列值。因此,image1 和 image2 分别有 100 条蓝线和 100 条红线。
但是,我想知道Matlab中是否有更好的方法来绘制图像中的差异image1 到 image2 更好地解释了变化的物理意义。谢谢。
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.
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.
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为你可以通过找到合适的阈值来找到“蓝色”和“橙色”之间的边界线。尝试使用graythresh,您的图像符合双模态图像的标准。
然后,您可以使用
polyfit
或其他最少的方法将物理模型拟合到边界曲线(例如y = ax^3+bx^2+cx+d)基于平方的方法。一旦你有了拟合,只需将它们显示为 2 个图,一个在另一个图上。 (您可以使用
hold on
)。告诉我是否需要更多说明。
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.
这就是我所做的:
This is what I did: