octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: graphics-branch in CVS


From: Bill Denney
Subject: Re: graphics-branch in CVS
Date: Thu, 1 Feb 2007 10:10:39 -0500 (EST)

On Wed, 31 Jan 2007, John W. Eaton wrote:

On 31-Jan-2007, Søren Hauberg wrote:
| Great I can now show images. However, the images doesn't appear to be
| correctly shown. If I type "imshow(rand(100))" I should see a gray-scale
| image of random colors, but I see a color image.

I'm not sure of the proper way to fix this bug. I suppose imshow should set some property to say that the image is greyscale instead of color, but I'm not sure which properies to set.

Generally, an mxnx1 matrix in the range [0 1] is considered greyscale while an mxnx3 in either the range [0 1] or [0 255] is considered RGB. An mxnx1 in the range [0 255] is considered indexed to the current colormap using the nearest integer (I'm only almost sure about the nearest integer part).

I'm pretty sure that's how matlab handles it, and it also seems logical to me.

Bill

--
"Maybe I shouldn't learn about life from a guy who counts with his toes."
"And thinks with his guts."
  -- Rex and Dogbert

reply via email to

[Prev in Thread] Current Thread [Next in Thread]