Filter löschen
Filter löschen

Problem on gray scale image.

2 Ansichten (letzte 30 Tage)
Esther
Esther am 19 Sep. 2012
Hi. i used gray = rgb2gray(I) at command window but why can't i get a grayscale image? thank you!

Antworten (2)

Walter Roberson
Walter Roberson am 19 Sep. 2012
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 am 20 Sep. 2012
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 Kommentare
Walter Roberson
Walter Roberson am 20 Sep. 2012
Okay, and then what do you do with grayImage to display it?
Image Analyst
Image Analyst am 20 Sep. 2012
Bearbeitet: Image Analyst am 20 Sep. 2012
So you DID get a gray scale image. Why did you say you did not?

Melden Sie sich an, um zu kommentieren.

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by