필터 지우기
필터 지우기

Overlaying manipulated RBG with grayscale image

조회 수: 1 (최근 30일)
Brian
Brian 2016년 2월 8일
댓글: Brian 2016년 2월 9일
Hello all!
I have an all red image ("red") that I combined with a binary mask ("mask"), such that only the pixels that are true in the binary mask is shown. I need the transparent red to be displayed as an overlay with a grayscale background image ("background"). Essentially, I want the transparent red to highlight parts of my grayscale image. I built a transparent red image corresponding to the binary mask with the following:
red=zeros(512,512,3);
red(:,:,1)=1;
hold on
h = imshow(red);
hold off
set(h, 'AlphaData', mask.*0.3)
I cannot figure out how to overlay this image with my background grayscale image however... The two keep showing as separate figures. Thank you so much!

채택된 답변

Image Analyst
Image Analyst 2016년 2월 8일
  댓글 수: 1
Brian
Brian 2016년 2월 9일
The first link is exactly what I needed! Turns out I just have my plotting command in the wrong line. Thank you so much!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by