[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Octave can display images with the X Window System using the
xloadimage
program. You do not need to be running X in order to
manipulate images, however, so some of these functions may be useful
even if you are not able to view the results.
Loading images only works with Octave's image format (a file with a matrix containing the image data, and a matrix containing the colormap). Contributions of robust, well-written functions to read other image formats are welcome. If you can provide them, or would like to improve Octave's image processing capabilities in other ways, please contact bug@octave.org.
colormap (map)
sets the current colormap to map. The
color map should be an n row by 3 column matrix. The columns
contain red, green, and blue intensities respectively. All entries
should be between 0 and 1 inclusive. The new colormap is returned.
colormap ("default")
restores the default colormap (a gray scale
colormap with 64 entries). The default colormap is returned.
With no arguments, colormap
returns the current color map.
It first tries to use display
from ImageMagick
then
xv
and then xloadimage
.
The axis values corresponding to the matrix elements are specified in x and y. At present they are ignored.
The axis values corresponding to the matrix elements are specified in x and y, either as pairs giving the minimum and maximum values for the respective axes, or as values for each row and column of the matrix A. At present they are ignored.
imshow (x)
displays an image x.
The numerical class of the image determines its bit-depth: 1 for
logical
, 8 for uint8
and logical
, and 16 for
double
or uint16
. If x has dimensions MxNx3, the
three matrices represent the red, green and blue components of the
image.
imshow (x, map)
displays an indexed image using the
specified colormap.
imshow (i, n)
displays a gray scale intensity image of
N levels.
imshow (r, g, b)
displays an RGB image.
The character string "truesize"
can always be used as an
optional final argument to prevent automatic zooming of the image.
A color n the RGB space consists of the red, green and blue intensities.
In the HSV space each color is represented by their hue, saturation and value (brightness). Value gives the amount of light in the color. Hue describes the dominant wavelegth. Saturation is the amount of Hue mixed into the color.
"img"
"ppm"
"ps"
If the fourth argument is supplied, the specified colormap will also be saved along with the image.
Note: if the colormap contains only two entries and these entries are black and white, the bitmap ppm and PostScript formats are used. If the image is a gray scale image (the entries within each row of the colormap are equal) the gray scale ppm and PostScript image formats are used, otherwise the full color formats are used.
[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |