How can I obtain pixel values from imfuse?
2 views (last 30 days)
Show older comments
Marco Terzariol
on 5 Jun 2020
Commented: Marco Terzariol
on 12 Jun 2020
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)
0 Comments
Accepted Answer
Shashank Gupta
on 9 Jun 2020
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.
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!