필터 지우기
필터 지우기

Problem on gray scale image.

조회 수: 2 (최근 30일)
Esther
Esther 2012년 9월 19일
Hi. i used gray = rgb2gray(I) at command window but why can't i get a grayscale image? thank you!

답변 (2개)

Walter Roberson
Walter Roberson 2012년 9월 19일
grayscaleimage = rgb2gray(I);
image(grayscaleimage);
colormap(gray);
Please note that "gray" is a MATLAB function for constructing grayscale colormaps. Writing to a variable named "gray" interferes with using the function "gray".

Esther
Esther 2012년 9월 20일
thanks for answer. i did this tutorial, http://www.mathworks.com/videos/developing-algorithms-with-matlab-68914.html just that i used a color image instead of a gray image. but i couldn't get a grayscale.
  댓글 수: 6
Walter Roberson
Walter Roberson 2012년 9월 20일
Okay, and then what do you do with grayImage to display it?
Image Analyst
Image Analyst 2012년 9월 20일
편집: Image Analyst 2012년 9월 20일
So you DID get a gray scale image. Why did you say you did not?

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by