How do I display the red channel of an image in Matlab?
问题 I have a 3D matrix im which represents an RGB image. I can do imshow(im) to display the image. I want to display only one of the RGB channels at a time: I want to display the red channel and I want it to appear red. I've tried imshow(im(:,:,1)) but it displays the grayscale image (which is not what I want). How do I display the red channel and make it appear red? 回答1: I have three proposals for you. 1. Use the imagesc function and choose a red color palette. 2. Clear the other color channels: