Overlaying color image on grayscale image

32 views (last 30 days)
I have two images, one in grayscale and one in color. The color image is a quantitative map (e.g. blood flow), while the grayscale simply shows anatomy. How can I segment out a portion of the color image and overlay on the grayscale image?

Answers (1)

Walter Roberson
Walter Roberson on 21 Oct 2015
image(TheGrayscaleImage);
colormap(gray(256));
hold on
image(TheColorImage, 'AlphaData', YourTransparencyData)
YourTransparencyData should be 1 in the places you want TheColorImage to completely show up, 0 in the places where you want the grayscale image to be completely visible and the color image not visible, and anything inbetween for the places you want to "blend" the two images.

Categories

Find more on Convert Image Type in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!