How to make a grayscale image semi transparent?

5 visualizaciones (últimos 30 días)
Shayan
Shayan el 14 de Jul. de 2011
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

Respuesta aceptada

Walter Roberson
Walter Roberson el 14 de Jul. de 2011
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 comentario
Shayan
Shayan el 14 de Jul. de 2011
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

Iniciar sesión para comentar.

Más respuestas (1)

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

Categorías

Más información sobre Images en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by