annotate doc/interpreter/image.txi @ 20628:3af34e1ef330

Preliminary inclusion of uixx objects properties in the manual (bug #46076) * doc/interpreter/genpropdoc.m: add uixx objects to the list of supported graphics objects * doc/interpreter/genpropdoc.m (get_doc): add uixx objects and their specific properties (currently empty documentation) * doc/interpreter/plot.txi("Interacting with Plots"): add a note and a reference about ui* family of functions. * doc/interpreter/plot.txi("Interacting with Plots"): for consistency, remove "uimenu" reference. All the other uixx are already in the gui section * doc/interpreter/plot.txi("graphics data structure"): add uixx objects * doc/interpreter/gui.txi("UI Elements"): add "uimenu" function reference * doc/module.mk: add rules to build uixx properties texi files. * graphics.in.h: make uixx "__object__" property (Octave internal) hidden so that it does not appear in the documentation.
author Pantxo Diribarne <pantxo.diribarne@gmail.com>
date Fri, 09 Oct 2015 16:25:27 +0200
parents 2480bbcd1333
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
19731
4197fc428c7d maint: Update copyright notices for 2015.
John W. Eaton <jwe@octave.org>
parents: 19630
diff changeset
1 @c Copyright (C) 1996-2015 John W. Eaton
7018
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 6788
diff changeset
2 @c
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 6788
diff changeset
3 @c This file is part of Octave.
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 6788
diff changeset
4 @c
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 6788
diff changeset
5 @c Octave is free software; you can redistribute it and/or modify it
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 6788
diff changeset
6 @c under the terms of the GNU General Public License as published by the
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 6788
diff changeset
7 @c Free Software Foundation; either version 3 of the License, or (at
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 6788
diff changeset
8 @c your option) any later version.
19627
446c46af4b42 strip trailing whitespace from most source files
John W. Eaton <jwe@octave.org>
parents: 17744
diff changeset
9 @c
7018
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 6788
diff changeset
10 @c Octave is distributed in the hope that it will be useful, but WITHOUT
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 6788
diff changeset
11 @c ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 6788
diff changeset
12 @c FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 6788
diff changeset
13 @c for more details.
19627
446c46af4b42 strip trailing whitespace from most source files
John W. Eaton <jwe@octave.org>
parents: 17744
diff changeset
14 @c
7018
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 6788
diff changeset
15 @c You should have received a copy of the GNU General Public License
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 6788
diff changeset
16 @c along with Octave; see the file COPYING. If not, see
fd42779a8428 [project @ 2007-10-13 00:52:12 by jwe]
jwe
parents: 6788
diff changeset
17 @c <http://www.gnu.org/licenses/>.
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
18
4167
aae05d51353c [project @ 2002-11-12 02:52:50 by jwe]
jwe
parents: 3803
diff changeset
19 @node Image Processing
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
20 @chapter Image Processing
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
21
16902
51c1076a9c13 doc: expand documentation on use of imformats.
Carnë Draug <carandraug@octave.org>
parents: 16901
diff changeset
22 Since an image is basically a matrix, Octave is a very powerful
9072
bd8e388043c4 Cleanup documentation for signal.texi, image.texi, audio.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
23 environment for processing and analyzing images. To illustrate
6529
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
24 how easy it is to do image processing in Octave, the following
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
25 example will load an image, smooth it by a 5-by-5 averaging filter,
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
26 and compute the gradient of the smoothed image.
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
27
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
28 @example
9072
bd8e388043c4 Cleanup documentation for signal.texi, image.texi, audio.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
29 @group
8148
213dd524f96b Improve documentation for image I/O.
sh@sh-laptop
parents: 8144
diff changeset
30 I = imread ("myimage.jpg");
6535
3ef1aa12f04c [project @ 2007-04-18 16:17:25 by jwe]
jwe
parents: 6529
diff changeset
31 S = conv2 (I, ones (5, 5) / 25, "same");
3ef1aa12f04c [project @ 2007-04-18 16:17:25 by jwe]
jwe
parents: 6529
diff changeset
32 [Dx, Dy] = gradient (S);
9072
bd8e388043c4 Cleanup documentation for signal.texi, image.texi, audio.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
33 @end group
6529
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
34 @end example
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
35
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
36 @noindent
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
37 In this example @code{S} contains the smoothed image, and @code{Dx}
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
38 and @code{Dy} contains the partial spatial derivatives of the image.
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
39
6535
3ef1aa12f04c [project @ 2007-04-18 16:17:25 by jwe]
jwe
parents: 6529
diff changeset
40 @menu
16902
51c1076a9c13 doc: expand documentation on use of imformats.
Carnë Draug <carandraug@octave.org>
parents: 16901
diff changeset
41 * Loading and Saving Images::
51c1076a9c13 doc: expand documentation on use of imformats.
Carnë Draug <carandraug@octave.org>
parents: 16901
diff changeset
42 * Displaying Images::
51c1076a9c13 doc: expand documentation on use of imformats.
Carnë Draug <carandraug@octave.org>
parents: 16901
diff changeset
43 * Representing Images::
51c1076a9c13 doc: expand documentation on use of imformats.
Carnë Draug <carandraug@octave.org>
parents: 16901
diff changeset
44 * Plotting on top of Images::
51c1076a9c13 doc: expand documentation on use of imformats.
Carnë Draug <carandraug@octave.org>
parents: 16901
diff changeset
45 * Color Conversion::
6535
3ef1aa12f04c [project @ 2007-04-18 16:17:25 by jwe]
jwe
parents: 6529
diff changeset
46 @end menu
3ef1aa12f04c [project @ 2007-04-18 16:17:25 by jwe]
jwe
parents: 6529
diff changeset
47
6529
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
48 @node Loading and Saving Images
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
49 @section Loading and Saving Images
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
50
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
51 The first step in most image processing tasks is to load an image
16902
51c1076a9c13 doc: expand documentation on use of imformats.
Carnë Draug <carandraug@octave.org>
parents: 16901
diff changeset
52 into Octave which is done with the @code{imread} function.
51c1076a9c13 doc: expand documentation on use of imformats.
Carnë Draug <carandraug@octave.org>
parents: 16901
diff changeset
53 The @code{imwrite} function is the corresponding function
8148
213dd524f96b Improve documentation for image I/O.
sh@sh-laptop
parents: 8144
diff changeset
54 for writing images to the disk.
213dd524f96b Improve documentation for image I/O.
sh@sh-laptop
parents: 8144
diff changeset
55
213dd524f96b Improve documentation for image I/O.
sh@sh-laptop
parents: 8144
diff changeset
56 In summary, most image processing code will follow the structure of this code
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
57
6529
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
58 @example
9072
bd8e388043c4 Cleanup documentation for signal.texi, image.texi, audio.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
59 @group
8148
213dd524f96b Improve documentation for image I/O.
sh@sh-laptop
parents: 8144
diff changeset
60 I = imread ("my_input_image.img");
6535
3ef1aa12f04c [project @ 2007-04-18 16:17:25 by jwe]
jwe
parents: 6529
diff changeset
61 J = process_my_image (I);
15032
fab341b143c4 doc: Fix image processing workflow documentation (bug #36974)
Rik <rik@octave.org>
parents: 14897
diff changeset
62 imwrite (J, "my_output_image.img");
9072
bd8e388043c4 Cleanup documentation for signal.texi, image.texi, audio.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
63 @end group
6529
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
64 @end example
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
65
8148
213dd524f96b Improve documentation for image I/O.
sh@sh-laptop
parents: 8144
diff changeset
66 @DOCSTRING(imread)
6529
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
67
8148
213dd524f96b Improve documentation for image I/O.
sh@sh-laptop
parents: 8144
diff changeset
68 @DOCSTRING(imwrite)
6529
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
69
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
70 @DOCSTRING(IMAGE_PATH)
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
71
8144
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents: 7984
diff changeset
72 It is possible to get information about an image file on disk, without actually
9072
bd8e388043c4 Cleanup documentation for signal.texi, image.texi, audio.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
73 reading it into Octave. This is done using the @code{imfinfo} function which
8144
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents: 7984
diff changeset
74 provides read access to many of the parameters stored in the header of the image
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents: 7984
diff changeset
75 file.
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents: 7984
diff changeset
76
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents: 7984
diff changeset
77 @DOCSTRING(imfinfo)
01fac748b680 Add the 'imfinfo' function for reading image file information.
sh@sh-laptop
parents: 7984
diff changeset
78
16902
51c1076a9c13 doc: expand documentation on use of imformats.
Carnë Draug <carandraug@octave.org>
parents: 16901
diff changeset
79 By default, Octave's image IO functions (@code{imread}, @code{imwrite},
51c1076a9c13 doc: expand documentation on use of imformats.
Carnë Draug <carandraug@octave.org>
parents: 16901
diff changeset
80 and @code{imfinfo}) use the @code{GraphicsMagick} library for their
51c1076a9c13 doc: expand documentation on use of imformats.
Carnë Draug <carandraug@octave.org>
parents: 16901
diff changeset
81 operations. This means a vast number of image formats is supported
16922
bfd119642f6a doc: Fix some spellings in image.texi.
Rik <rik@octave.org>
parents: 16902
diff changeset
82 but considering the large amount of image formats in science and
16902
51c1076a9c13 doc: expand documentation on use of imformats.
Carnë Draug <carandraug@octave.org>
parents: 16901
diff changeset
83 its commonly closed nature, it is impossible to have a library
51c1076a9c13 doc: expand documentation on use of imformats.
Carnë Draug <carandraug@octave.org>
parents: 16901
diff changeset
84 capable of reading them all. Because of this, the function
51c1076a9c13 doc: expand documentation on use of imformats.
Carnë Draug <carandraug@octave.org>
parents: 16901
diff changeset
85 @code{imformats} keeps a configurable list of available formats,
51c1076a9c13 doc: expand documentation on use of imformats.
Carnë Draug <carandraug@octave.org>
parents: 16901
diff changeset
86 their extensions, and what functions should the image IO functions
20132
1f9ed81bd173 maint: Fix spelling and grammar mistakes in docs and comments (bug #44878)
Rafael Laboissiere <rafael@laboissiere.net>
parents: 19731
diff changeset
87 use. This allows one to expand Octave's image IO capabilities by
16902
51c1076a9c13 doc: expand documentation on use of imformats.
Carnë Draug <carandraug@octave.org>
parents: 16901
diff changeset
88 creating functions aimed at acting on specific file formats.
51c1076a9c13 doc: expand documentation on use of imformats.
Carnë Draug <carandraug@octave.org>
parents: 16901
diff changeset
89
51c1076a9c13 doc: expand documentation on use of imformats.
Carnë Draug <carandraug@octave.org>
parents: 16901
diff changeset
90 While it would be possible to call the extra functions directly,
20132
1f9ed81bd173 maint: Fix spelling and grammar mistakes in docs and comments (bug #44878)
Rafael Laboissiere <rafael@laboissiere.net>
parents: 19731
diff changeset
91 properly configuring Octave with @code{imformats} allows one to keep a
16902
51c1076a9c13 doc: expand documentation on use of imformats.
Carnë Draug <carandraug@octave.org>
parents: 16901
diff changeset
92 consistent code that is abstracted from file formats.
51c1076a9c13 doc: expand documentation on use of imformats.
Carnë Draug <carandraug@octave.org>
parents: 16901
diff changeset
93
51c1076a9c13 doc: expand documentation on use of imformats.
Carnë Draug <carandraug@octave.org>
parents: 16901
diff changeset
94 It is important to note that a file format is not actually defined by its
51c1076a9c13 doc: expand documentation on use of imformats.
Carnë Draug <carandraug@octave.org>
parents: 16901
diff changeset
95 file extension and that @code{GraphicsMagick} is capable to read and write
51c1076a9c13 doc: expand documentation on use of imformats.
Carnë Draug <carandraug@octave.org>
parents: 16901
diff changeset
96 more file formats than the ones listed by @code{imformats}. What this
51c1076a9c13 doc: expand documentation on use of imformats.
Carnë Draug <carandraug@octave.org>
parents: 16901
diff changeset
97 means is that even with an incorrect or missing extension the image may
51c1076a9c13 doc: expand documentation on use of imformats.
Carnë Draug <carandraug@octave.org>
parents: 16901
diff changeset
98 still be read correctly, and that even unlisted formats are not necessarily
51c1076a9c13 doc: expand documentation on use of imformats.
Carnë Draug <carandraug@octave.org>
parents: 16901
diff changeset
99 unsupported.
51c1076a9c13 doc: expand documentation on use of imformats.
Carnë Draug <carandraug@octave.org>
parents: 16901
diff changeset
100
16901
861516dcad19 New function imformats.
Carnë Draug <carandraug@octave.org>
parents: 15513
diff changeset
101 @DOCSTRING(imformats)
861516dcad19 New function imformats.
Carnë Draug <carandraug@octave.org>
parents: 15513
diff changeset
102
6529
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
103 @node Displaying Images
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
104 @section Displaying Images
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
105
6529
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
106 A natural part of image processing is visualization of an image.
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
107 The most basic function for this is the @code{imshow} function that
11109
41d18f6342f9 remove image_viewer function
John W. Eaton <jwe@octave.org>
parents: 10828
diff changeset
108 shows the image given in the first input argument.
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
109
6529
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
110 @DOCSTRING(imshow)
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
111
3373
36405da8e173 [project @ 1999-11-23 20:54:17 by jwe]
jwe
parents: 3294
diff changeset
112 @DOCSTRING(image)
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
113
3373
36405da8e173 [project @ 1999-11-23 20:54:17 by jwe]
jwe
parents: 3294
diff changeset
114 @DOCSTRING(imagesc)
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
115
6529
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
116 @node Representing Images
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
117 @section Representing Images
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
118
14897
8e2a6fc55787 doc: Use 'grayscale' rather than 'gray-scale' in documentation.
Rik <rik@octave.org>
parents: 14896
diff changeset
119 In general Octave supports four different kinds of images, grayscale
8e2a6fc55787 doc: Use 'grayscale' rather than 'gray-scale' in documentation.
Rik <rik@octave.org>
parents: 14896
diff changeset
120 images, RGB images, binary images, and indexed images. A grayscale
6535
3ef1aa12f04c [project @ 2007-04-18 16:17:25 by jwe]
jwe
parents: 6529
diff changeset
121 image is represented with an M-by-N matrix in which each
9072
bd8e388043c4 Cleanup documentation for signal.texi, image.texi, audio.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
122 element corresponds to the intensity of a pixel. An RGB image is
8325
b93ac0586e4b spelling corrections
Brian Gough<bjg@network-theory.co.uk>
parents: 8148
diff changeset
123 represented with an M-by-N-by-3 array where each
6529
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
124 3-vector corresponds to the red, green, and blue intensities of each
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
125 pixel.
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
126
14897
8e2a6fc55787 doc: Use 'grayscale' rather than 'gray-scale' in documentation.
Rik <rik@octave.org>
parents: 14896
diff changeset
127 The actual meaning of the value of a pixel in a grayscale or RGB
9072
bd8e388043c4 Cleanup documentation for signal.texi, image.texi, audio.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
128 image depends on the class of the matrix. If the matrix is of class
6529
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
129 @code{double} pixel intensities are between 0 and 1, if it is of class
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
130 @code{uint8} intensities are between 0 and 255, and if it is of class
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
131 @code{uint16} intensities are between 0 and 65535.
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
132
8347
fa78cb8d8a5c corrections for typos
Brian Gough<bjg@network-theory.co.uk>
parents: 8325
diff changeset
133 A binary image is an M-by-N matrix of class @code{logical}.
6529
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
134 A pixel in a binary image is black if it is @code{false} and white
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
135 if it is @code{true}.
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
136
6535
3ef1aa12f04c [project @ 2007-04-18 16:17:25 by jwe]
jwe
parents: 6529
diff changeset
137 An indexed image consists of an M-by-N matrix of integers
9072
bd8e388043c4 Cleanup documentation for signal.texi, image.texi, audio.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
138 and a C-by-3 color map. Each integer corresponds to an
6529
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
139 index in the color map, and each row in the color map corresponds to
9072
bd8e388043c4 Cleanup documentation for signal.texi, image.texi, audio.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
140 an RGB color. The color map must be of class @code{double} with values
6529
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
141 between 0 and 1.
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
142
15513
7a0a202fedfe iscolormap: new function for image
Carnë Draug <carandraug+dev@gmail.com>
parents: 15032
diff changeset
143 @DOCSTRING(iscolormap)
7a0a202fedfe iscolormap: new function for image
Carnë Draug <carandraug+dev@gmail.com>
parents: 15032
diff changeset
144
6529
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
145 @DOCSTRING(gray2ind)
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
146
3373
36405da8e173 [project @ 1999-11-23 20:54:17 by jwe]
jwe
parents: 3294
diff changeset
147 @DOCSTRING(ind2gray)
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
148
6529
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
149 @DOCSTRING(rgb2ind)
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
150
3373
36405da8e173 [project @ 1999-11-23 20:54:17 by jwe]
jwe
parents: 3294
diff changeset
151 @DOCSTRING(ind2rgb)
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
152
6529
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
153 @DOCSTRING(colormap)
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
154
14271
e2a14d1b4eaa rgbplot.m: Add new Matlab compatible function for plotting colormaps
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
155 @DOCSTRING(rgbplot)
e2a14d1b4eaa rgbplot.m: Add new Matlab compatible function for plotting colormaps
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
156
6788
c81a0f3f5a82 [project @ 2007-07-23 22:05:29 by dbateman]
dbateman
parents: 6778
diff changeset
157 @DOCSTRING(autumn)
c81a0f3f5a82 [project @ 2007-07-23 22:05:29 by dbateman]
dbateman
parents: 6778
diff changeset
158
c81a0f3f5a82 [project @ 2007-07-23 22:05:29 by dbateman]
dbateman
parents: 6778
diff changeset
159 @DOCSTRING(bone)
c81a0f3f5a82 [project @ 2007-07-23 22:05:29 by dbateman]
dbateman
parents: 6778
diff changeset
160
14274
727b74f512af colorcube.m: Add new colormap which maximizes equally spaced colors.
Rik <octave@nomad.inbox5.com>
parents: 14272
diff changeset
161 @DOCSTRING(colorcube)
727b74f512af colorcube.m: Add new colormap which maximizes equally spaced colors.
Rik <octave@nomad.inbox5.com>
parents: 14272
diff changeset
162
6788
c81a0f3f5a82 [project @ 2007-07-23 22:05:29 by dbateman]
dbateman
parents: 6778
diff changeset
163 @DOCSTRING(cool)
c81a0f3f5a82 [project @ 2007-07-23 22:05:29 by dbateman]
dbateman
parents: 6778
diff changeset
164
c81a0f3f5a82 [project @ 2007-07-23 22:05:29 by dbateman]
dbateman
parents: 6778
diff changeset
165 @DOCSTRING(copper)
c81a0f3f5a82 [project @ 2007-07-23 22:05:29 by dbateman]
dbateman
parents: 6778
diff changeset
166
19564
5ab6fcf32d1e New function for colormap cubehelix.
Carnë Draug <carandraug@octave.org>
parents: 17744
diff changeset
167 @DOCSTRING(cubehelix)
5ab6fcf32d1e New function for colormap cubehelix.
Carnë Draug <carandraug@octave.org>
parents: 17744
diff changeset
168
8817
03b7f618ab3d include docstrings for new functions in the manual
John W. Eaton <jwe@octave.org>
parents: 8539
diff changeset
169 @DOCSTRING(flag)
03b7f618ab3d include docstrings for new functions in the manual
John W. Eaton <jwe@octave.org>
parents: 8539
diff changeset
170
6529
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
171 @DOCSTRING(gray)
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
172
6788
c81a0f3f5a82 [project @ 2007-07-23 22:05:29 by dbateman]
dbateman
parents: 6778
diff changeset
173 @DOCSTRING(hot)
c81a0f3f5a82 [project @ 2007-07-23 22:05:29 by dbateman]
dbateman
parents: 6778
diff changeset
174
c81a0f3f5a82 [project @ 2007-07-23 22:05:29 by dbateman]
dbateman
parents: 6778
diff changeset
175 @DOCSTRING(hsv)
c81a0f3f5a82 [project @ 2007-07-23 22:05:29 by dbateman]
dbateman
parents: 6778
diff changeset
176
c81a0f3f5a82 [project @ 2007-07-23 22:05:29 by dbateman]
dbateman
parents: 6778
diff changeset
177 @DOCSTRING(jet)
c81a0f3f5a82 [project @ 2007-07-23 22:05:29 by dbateman]
dbateman
parents: 6778
diff changeset
178
14272
4f8d2931f886 lines.m: Add new colormap corresponding to ColorOrder property.
Rik <octave@nomad.inbox5.com>
parents: 14271
diff changeset
179 @DOCSTRING(lines)
4f8d2931f886 lines.m: Add new colormap corresponding to ColorOrder property.
Rik <octave@nomad.inbox5.com>
parents: 14271
diff changeset
180
6529
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
181 @DOCSTRING(ocean)
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
182
6788
c81a0f3f5a82 [project @ 2007-07-23 22:05:29 by dbateman]
dbateman
parents: 6778
diff changeset
183 @DOCSTRING(pink)
c81a0f3f5a82 [project @ 2007-07-23 22:05:29 by dbateman]
dbateman
parents: 6778
diff changeset
184
c81a0f3f5a82 [project @ 2007-07-23 22:05:29 by dbateman]
dbateman
parents: 6778
diff changeset
185 @DOCSTRING(prism)
c81a0f3f5a82 [project @ 2007-07-23 22:05:29 by dbateman]
dbateman
parents: 6778
diff changeset
186
c81a0f3f5a82 [project @ 2007-07-23 22:05:29 by dbateman]
dbateman
parents: 6778
diff changeset
187 @DOCSTRING(rainbow)
c81a0f3f5a82 [project @ 2007-07-23 22:05:29 by dbateman]
dbateman
parents: 6778
diff changeset
188
c81a0f3f5a82 [project @ 2007-07-23 22:05:29 by dbateman]
dbateman
parents: 6778
diff changeset
189 @DOCSTRING(spring)
c81a0f3f5a82 [project @ 2007-07-23 22:05:29 by dbateman]
dbateman
parents: 6778
diff changeset
190
c81a0f3f5a82 [project @ 2007-07-23 22:05:29 by dbateman]
dbateman
parents: 6778
diff changeset
191 @DOCSTRING(summer)
c81a0f3f5a82 [project @ 2007-07-23 22:05:29 by dbateman]
dbateman
parents: 6778
diff changeset
192
20567
2480bbcd1333 fix documentation for new viridis colormap
John W. Eaton <jwe@octave.org>
parents: 20535
diff changeset
193 @DOCSTRING(viridis)
2480bbcd1333 fix documentation for new viridis colormap
John W. Eaton <jwe@octave.org>
parents: 20535
diff changeset
194
6788
c81a0f3f5a82 [project @ 2007-07-23 22:05:29 by dbateman]
dbateman
parents: 6778
diff changeset
195 @DOCSTRING(white)
c81a0f3f5a82 [project @ 2007-07-23 22:05:29 by dbateman]
dbateman
parents: 6778
diff changeset
196
c81a0f3f5a82 [project @ 2007-07-23 22:05:29 by dbateman]
dbateman
parents: 6778
diff changeset
197 @DOCSTRING(winter)
c81a0f3f5a82 [project @ 2007-07-23 22:05:29 by dbateman]
dbateman
parents: 6778
diff changeset
198
7984
bbaa5d7d0143 Some documentation updates
David Bateman <dbateman@free.fr>
parents: 7189
diff changeset
199 @DOCSTRING(contrast)
bbaa5d7d0143 Some documentation updates
David Bateman <dbateman@free.fr>
parents: 7189
diff changeset
200
12189
9558ca33648d Add functions reset, whitebg to documentation.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
201 The following three functions modify the existing colormap rather than
17281
bc924baa2c4e doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents: 16922
diff changeset
202 replace it.
12189
9558ca33648d Add functions reset, whitebg to documentation.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
203
9558ca33648d Add functions reset, whitebg to documentation.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
204 @DOCSTRING(brighten)
8817
03b7f618ab3d include docstrings for new functions in the manual
John W. Eaton <jwe@octave.org>
parents: 8539
diff changeset
205
03b7f618ab3d include docstrings for new functions in the manual
John W. Eaton <jwe@octave.org>
parents: 8539
diff changeset
206 @DOCSTRING(spinmap)
03b7f618ab3d include docstrings for new functions in the manual
John W. Eaton <jwe@octave.org>
parents: 8539
diff changeset
207
12189
9558ca33648d Add functions reset, whitebg to documentation.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
208 @DOCSTRING(whitebg)
9558ca33648d Add functions reset, whitebg to documentation.
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
209
14896
0ba7be7fed1c Add new functions cmpermute(), cmunque().
Rik <rik@octave.org>
parents: 14274
diff changeset
210 The following functions can be used to manipulate colormaps.
0ba7be7fed1c Add new functions cmpermute(), cmunque().
Rik <rik@octave.org>
parents: 14274
diff changeset
211
0ba7be7fed1c Add new functions cmpermute(), cmunque().
Rik <rik@octave.org>
parents: 14274
diff changeset
212 @DOCSTRING(cmunique)
0ba7be7fed1c Add new functions cmpermute(), cmunque().
Rik <rik@octave.org>
parents: 14274
diff changeset
213
0ba7be7fed1c Add new functions cmpermute(), cmunque().
Rik <rik@octave.org>
parents: 14274
diff changeset
214 @DOCSTRING(cmpermute)
0ba7be7fed1c Add new functions cmpermute(), cmunque().
Rik <rik@octave.org>
parents: 14274
diff changeset
215
6529
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
216 @node Plotting on top of Images
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
217 @section Plotting on top of Images
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
218
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
219 If gnuplot is being used to display images it is possible to plot on
9072
bd8e388043c4 Cleanup documentation for signal.texi, image.texi, audio.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
220 top of images. Since an image is a matrix it is indexed by row and
19627
446c46af4b42 strip trailing whitespace from most source files
John W. Eaton <jwe@octave.org>
parents: 17744
diff changeset
221 column values. The plotting system is, however, based on the
9072
bd8e388043c4 Cleanup documentation for signal.texi, image.texi, audio.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
222 traditional @math{(x, y)} system. To minimize the difference between
6529
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
223 the two systems Octave places the origin of the coordinate system in
9072
bd8e388043c4 Cleanup documentation for signal.texi, image.texi, audio.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
224 the point corresponding to the pixel at @math{(1, 1)}. So, to plot
6529
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
225 points given by row and column values on top of an image, one should
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
226 simply call @code{plot} with the column values as the first argument
9072
bd8e388043c4 Cleanup documentation for signal.texi, image.texi, audio.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
227 and the row values as the second. As an example the following code
6529
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
228 generates an image with random intensities between 0 and 1, and shows
19627
446c46af4b42 strip trailing whitespace from most source files
John W. Eaton <jwe@octave.org>
parents: 17744
diff changeset
229 the image with red circles over pixels with an intensity above
6529
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
230 @math{0.99}.
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
231
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
232 @example
9072
bd8e388043c4 Cleanup documentation for signal.texi, image.texi, audio.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
233 @group
6535
3ef1aa12f04c [project @ 2007-04-18 16:17:25 by jwe]
jwe
parents: 6529
diff changeset
234 I = rand (100, 100);
3ef1aa12f04c [project @ 2007-04-18 16:17:25 by jwe]
jwe
parents: 6529
diff changeset
235 [row, col] = find (I > 0.99);
3ef1aa12f04c [project @ 2007-04-18 16:17:25 by jwe]
jwe
parents: 6529
diff changeset
236 hold ("on");
3ef1aa12f04c [project @ 2007-04-18 16:17:25 by jwe]
jwe
parents: 6529
diff changeset
237 imshow (I);
3ef1aa12f04c [project @ 2007-04-18 16:17:25 by jwe]
jwe
parents: 6529
diff changeset
238 plot (col, row, "ro");
3ef1aa12f04c [project @ 2007-04-18 16:17:25 by jwe]
jwe
parents: 6529
diff changeset
239 hold ("off");
9072
bd8e388043c4 Cleanup documentation for signal.texi, image.texi, audio.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
240 @end group
6529
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
241 @end example
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
242
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
243 @node Color Conversion
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
244 @section Color Conversion
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
245
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
246 Octave supports conversion from the RGB color system to NTSC and HSV
19627
446c46af4b42 strip trailing whitespace from most source files
John W. Eaton <jwe@octave.org>
parents: 17744
diff changeset
247 and vice versa.
6529
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
248
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
249 @DOCSTRING(rgb2hsv)
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
250
853f99e292ec [project @ 2007-04-16 21:29:03 by jwe]
jwe
parents: 6502
diff changeset
251 @DOCSTRING(hsv2rgb)
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
252
3373
36405da8e173 [project @ 1999-11-23 20:54:17 by jwe]
jwe
parents: 3294
diff changeset
253 @DOCSTRING(rgb2ntsc)
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
254
3373
36405da8e173 [project @ 1999-11-23 20:54:17 by jwe]
jwe
parents: 3294
diff changeset
255 @DOCSTRING(ntsc2rgb)
3294
bfe1573bd2ae [project @ 1999-10-19 10:06:07 by jwe]
jwe
parents:
diff changeset
256
3803
63c75bc3db82 [project @ 2001-02-28 08:24:40 by jwe]
jwe
parents: 3373
diff changeset
257