Overlay two images in one axes?
Mostra commenti meno recenti
I have two images of the same object, but with different resolutions (and sizes).
I want to show the high resolution image in grey scale as the background and the low resolution image in parula colormap (for example) in the foreground, and add some adjustable transparency so that both can be visualized.
I realize that, I first need to do image registration of the two and then, I can overlay them using
imshowpair(img1,ref1,img2,ref2), where, ref1 and ref2 are image references. obtained using imref2d.
But how can I plot them in two different color scales of my own selection, in one axes? and I can freely adjust the properties of two image objects?
4 Commenti
KALYAN ACHARJYA
il 21 Gen 2020
But how can I plot them in two different color scales of my own selection, in one axes?
I dont think, it possible to adjust (technically) the both image in one with dual data type space (RGB & Gray). Yes you can show the RGB and gray image in RGB space (3 planes), where RGB is already in 3 color planes and you need to cat the gray image (It is not 3 planes, but with seen as gray iamge-visula only).
Can you provide me the two sample image, so that I can try on it.
Walter Roberson
il 21 Gen 2020
repmat(Grey, 1,1,3) to create an rgb equivalent that does not need a colormap. image() that passing in xdata and ydata values to position it on the axes. Now you can hold on and image() the other one passing in xdata and ydata and then colormap() as appropriate
xi
il 21 Gen 2020
xi
il 21 Gen 2020
Risposte (2)
Walter Roberson
il 21 Gen 2020
RGB = repmat(I2,1,1,3);
h2 = image([0 1], [0 1], RGB);
hold on
h1 = image([0 1], [0 1], I1, 'alphadata', 0.8);
colormap(parula);
hold off
and you can set the CData property of h1 as needed.
I2 will not appear grayscale, but that is because you are overlaying RGB on top of it.
Image Analyst
il 22 Gen 2020
0 voti
With newer versions of MATLAB, try imoverlay().
Categorie
Scopri di più su Blue in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
