[Top][All Lists]

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

octave imaging

From: Stefan van der Walt
Subject: octave imaging
Date: Thu, 12 Feb 2004 11:51:54 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031107 Debian/1.5-3

Hi All

I would like to know what image/matrix format is preferred by Octave.

All the imaging functions seem to be written for images in
[0, 1].  This could be rather confusing, for example:

octave:128> I = imread('lena256.jpg'); % read image
octave:129> colormap(gray(256));       % set colormap to 256 gray scales
octave:130> imshow(I)                  % display lena
octave:131> histeq(I)                  % oops! expected I in [0,1]
error: `n' undefined near line 30 column 16

So imshow does not handle images in [0,1] (it handles only indexed
   images), but the other functions expect images in [0,1]:

octave:140> [p,m] = gray2ind(I/255, 256)

works correctly, while

octave:140> [p,m] = gray2ind(I, 256)


It is, for example, very counterintuitive that the following code
doesn't work:


MATLAB handles the different images with 'classes', but I do not think
Octave has that functionality.

Thanks in advance.

Stéfan van der Walt

Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:
How to fund new projects:
Subscription information:

reply via email to

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