Borrar filtros
Borrar filtros

using imshow how to display the color image

4 visualizaciones (últimos 30 días)
Nithya SIvasamy
Nithya SIvasamy el 13 de Mayo de 2017
Comentada: Image Analyst el 13 de Mayo de 2017
Input_Im=imread('C:\Users\Documents\canvas001-inca-100dpi-00.bmp'); imshow(input_Im(1:128,1:128));
when i use this code,it is displaying the image in gray scale. But the input image is a color image. How to get the color image when the input image is segmented

Respuestas (1)

Guillaume
Guillaume el 13 de Mayo de 2017
Assuming the image is truly a colour image and not an indexed image:
imshow(input_Im(1:128, 1:128, :));
If you don't say you want all three colour planes (the : in the 3rd dimension) you only get the 1st one.
  2 comentarios
Nithya SIvasamy
Nithya SIvasamy el 13 de Mayo de 2017
Thank you .Its working exactly
Image Analyst
Image Analyst el 13 de Mayo de 2017
Then can you please Accept and Vote for his answer so he can get "reputation points"?
This might also be interesting to see what happens if you leave off a dimension when indexing arrays. http://blogs.mathworks.com/steve/2011/03/22/too-much-information-about-the-size-function/

Iniciar sesión para comentar.

Categorías

Más información sobre Display Image en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by