필터 지우기
필터 지우기

using imshow how to display the color image

조회 수: 4 (최근 30일)
Nithya SIvasamy
Nithya SIvasamy 2017년 5월 13일
댓글: Image Analyst 2017년 5월 13일
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

답변 (1개)

Guillaume
Guillaume 2017년 5월 13일
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
Nithya SIvasamy
Nithya SIvasamy 2017년 5월 13일
Thank you .Its working exactly
Image Analyst
Image Analyst 2017년 5월 13일
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/

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Display Image에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by