[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: usage of imread.m in octave
From: |
Stefan van der Walt |
Subject: |
Re: usage of imread.m in octave |
Date: |
Thu, 15 Jul 2004 11:45:06 +0200 |
User-agent: |
Mutt/1.5.6+20040523i |
Hi Ole
I am not sure why you do not get a colour display. Here, I do:
octave:3> [r,g,b] = imread('testimage.jpg');
octave:4> imshow(r,g,b)
and a colour display ImageMagick pops up.
What happens when you do
$ display /cygdrive/c/temp/testimage.jpg
from the command prompt? Are you running Octave 2.1.57?
Regards
Stefan
On Thu, Jul 15, 2004 at 11:05:30AM +0200, Ole Jacob Hagen wrote:
> Hi, Daniel.
>
> I've tried that one (imshow(r,g,b)), but the image doesn't appear in
> colours, just greyscale.
>
> So I guess a fix in imread.m is required, if colour images are
> impossible to visualise from Octave. Any volunteers?
>
> Cheers,
>
> Ole
>
> Daniel J Sebald wrote:
>
> >From what I've seen, only gray scale and color palettes (i.e.,
> >"colormap") currently work in Octave. To show a color image, you need
> >independent primary color components, e.g., RGB. So first, you can't use
> >
> >X = imread('testimage.jpg');
> >
> >because X can't have RGB. (Unless it were a 3 dimensional matrix,
> >which I think it isn't.) So you need something like the RGB variant:
> >
> >[r,g,b]= imread( fname );
> >
> >Then you can do an
> >
> >imshow(r,g,b);
> >
> >But, currently here is what imshow() does for the RGB
> >
> >elseif (nargin == 3)
> >[a1, a2] = rgb2ind (a1, a2, a3);
> >colormap (a2);
> >endif
> >
> >i.e., converts to an indexed image. I believe in general that can only
> >be an approximation.
> >
> >Dan
> >
> >
> >
>
>
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: usage of imread.m in octave,
Stefan van der Walt <=