How to make a grayscale image semi transparent?

5 次查看(过去 30 天)
I have two grayscale images in which one of them is registered to the other.
How can I make the mapping image semitransparent and overlay it on the registered image?
Note both pictures are gray scale.
Thanks, Shayan

采纳的回答

Walter Roberson
Walter Roberson 2011-7-14
Both image() and imagesc() construct objects of class "image"; "image" objects have an AlphaData property. You can either set() that property after the return from image() or imagesc(), or you can pass a name/value pair for AlphaData as part of the image() or imagesc() call
  1 个评论
Shayan
Shayan 2011-7-14
I tried;
figure, imshow(IB_trans2,'XData', xdata, 'YData', ydata)
hold on
%%
h = imshow(IA);
set(h, 'AlphaData', 0.6)
and it works!
Thanks Walter

请先登录,再进行评论。

更多回答(1 个)

nishant
nishant 2012-6-20
thanks a lol. it works and its musch simpler than what I was trying to do.

类别

Help CenterFile Exchange 中查找有关 Images 的更多信息

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by