How can I obtain pixel values from imfuse?

4 ビュー (過去 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