MATLAB: Images

Image Processing Toolboximage red color

for extracting red color alone of a color image input, i used the following code.
i=imread('football.jpg');
v=i(:,:,1);
imshow(v)
whether my code is doubt and if yes, why red color is not visible

Best Answer

You extracted the red channel of a color image. Each color channel is simply a 2D image with an intensity. Essentially each one is a monochrome image, and those are displayed in gray scale by default. You can apply a colormap if you want to each to make it appear in it's original shade as explained in http://www.mathworks.com/support/solutions/en/data/1-GNRWEH/index.html;jsessionid=523e8fb9a5651ebf4a0434578bbb but it's not really necessary and not usually done, or convert back to a color image again like Razvan did.