How to make a grayscale image semi transparent?

조회 수: 4 (최근 30일)
Shayan
Shayan 2011년 7월 14일
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