How can I obtain pixel values from imfuse?

조회 수: 2 (최근 30일)
Marco Terzariol
Marco Terzariol 2020년 6월 5일
댓글: Marco Terzariol 2020년 6월 12일
Hello,
I would like to get the pixel values from the result of a imfuse function. So, I have two images that I called I1 and I2. I use imread to read both of them into Matlab. Then I use imfuse. The result of imfuse I save it on C and plot it. The spots in magenta are exactly what I need, but I cannot find any command to recover which pixels show magenta. Is there a way to recover the pixels that are colored in magenta?
Thank you in advance!
Here below is my code and the two images that I use:
I1 = imread('I1.png')
I2 = imread('I2.png')
Fused = imfuse(I1,I2);
imshow(Fused)

채택된 답변

Shashank Gupta
Shashank Gupta 2020년 6월 9일
Hi Marco,
The function “imfuse” by default use “falsecolor” algorithm, so the green and magenta color you able to see are the regions where the intensities are different of the image I1 and I2 provided to the function. The first and the third channel of the output “Fused” has the information about the magenta color, while the second channel gives the information about the green color.
One easy way I can think of to address your concern is to extract magenta color channel from the output image and use it. I understand you need to work something more on top of it. But atleast extracting that channel gives an head start or some idea about the region of pixels which has color magenta.
I hope it helps you.
  댓글 수: 1
Marco Terzariol
Marco Terzariol 2020년 6월 12일
Hi! Thanks for your reply. I ended up doing what you suggested. I extracted the magenta separately. So far it’s working. Thanks again!

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

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by