annotate scripts/image/gray2ind.m @ 19833:9fc020886ae9

maint: Clean up m-files to follow Octave coding conventions. Try to trim long lines to < 80 chars. Use '##' for single line comments. Use '(...)' around tests for if/elseif/switch/while. Abut cell indexing operator '{' next to variable. Abut array indexing operator '(' next to variable. Use space between negation operator '!' and following expression. Use two newlines between endfunction and start of %!test or %!demo code. Remove unnecessary parens grouping between short-circuit operators. Remove stray extra spaces (typos) between variables and assignment operators. Remove stray extra spaces from ends of lines.
author Rik <rik@octave.org>
date Mon, 23 Feb 2015 14:54:39 -0800
parents 70911df8ad28
children 7503499a252b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
19697
4197fc428c7d maint: Update copyright notices for 2015.
John W. Eaton <jwe@octave.org>
parents: 19593
diff changeset
1 ## Copyright (C) 1994-2015 John W. Eaton
2313
5ca126254d15 [project @ 1996-07-11 21:25:22 by jwe]
jwe
parents: 2312
diff changeset
2 ##
5ca126254d15 [project @ 1996-07-11 21:25:22 by jwe]
jwe
parents: 2312
diff changeset
3 ## This file is part of Octave.
5ca126254d15 [project @ 1996-07-11 21:25:22 by jwe]
jwe
parents: 2312
diff changeset
4 ##
5ca126254d15 [project @ 1996-07-11 21:25:22 by jwe]
jwe
parents: 2312
diff changeset
5 ## Octave is free software; you can redistribute it and/or modify it
5ca126254d15 [project @ 1996-07-11 21:25:22 by jwe]
jwe
parents: 2312
diff changeset
6 ## under the terms of the GNU General Public License as published by
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6046
diff changeset
7 ## the Free Software Foundation; either version 3 of the License, or (at
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6046
diff changeset
8 ## your option) any later version.
2313
5ca126254d15 [project @ 1996-07-11 21:25:22 by jwe]
jwe
parents: 2312
diff changeset
9 ##
5ca126254d15 [project @ 1996-07-11 21:25:22 by jwe]
jwe
parents: 2312
diff changeset
10 ## Octave is distributed in the hope that it will be useful, but
5ca126254d15 [project @ 1996-07-11 21:25:22 by jwe]
jwe
parents: 2312
diff changeset
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of
5ca126254d15 [project @ 1996-07-11 21:25:22 by jwe]
jwe
parents: 2312
diff changeset
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5ca126254d15 [project @ 1996-07-11 21:25:22 by jwe]
jwe
parents: 2312
diff changeset
13 ## General Public License for more details.
5ca126254d15 [project @ 1996-07-11 21:25:22 by jwe]
jwe
parents: 2312
diff changeset
14 ##
5ca126254d15 [project @ 1996-07-11 21:25:22 by jwe]
jwe
parents: 2312
diff changeset
15 ## You should have received a copy of the GNU General Public License
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6046
diff changeset
16 ## along with Octave; see the file COPYING. If not, see
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6046
diff changeset
17 ## <http://www.gnu.org/licenses/>.
559
4e826edfbc56 [project @ 1994-07-25 22:18:28 by jwe]
jwe
parents:
diff changeset
18
3381
69b167451491 [project @ 1999-12-15 20:48:10 by jwe]
jwe
parents: 3373
diff changeset
19 ## -*- texinfo -*-
15683
806ea52af230 Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents: 14868
diff changeset
20 ## @deftypefn {Function File} {@var{img} =} gray2ind (@var{I})
806ea52af230 Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents: 14868
diff changeset
21 ## @deftypefnx {Function File} {@var{img} =} gray2ind (@var{I}, @var{n})
806ea52af230 Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents: 14868
diff changeset
22 ## @deftypefnx {Function File} {@var{img} =} gray2ind (@var{BW})
806ea52af230 Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents: 14868
diff changeset
23 ## @deftypefnx {Function File} {@var{img} =} gray2ind (@var{BW}, @var{n})
806ea52af230 Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents: 14868
diff changeset
24 ## @deftypefnx {Function File} {[@var{img}, @var{map}] =} gray2ind (@dots{})
806ea52af230 Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents: 14868
diff changeset
25 ## Convert a grayscale or binary intensity image to an indexed image.
19593
446c46af4b42 strip trailing whitespace from most source files
John W. Eaton <jwe@octave.org>
parents: 17744
diff changeset
26 ##
14260
1f911333ed3d doc: Update docstrings for functions in image/ directory
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
27 ## The indexed image will consist of @var{n} different intensity values.
15683
806ea52af230 Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents: 14868
diff changeset
28 ## If not given @var{n} defaults to 64 for grayscale images or 2 for
806ea52af230 Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents: 14868
diff changeset
29 ## binary black and white images.
806ea52af230 Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents: 14868
diff changeset
30 ##
15714
b1cd65881592 Clean up scripts in image directory.
Rik <rik@octave.org>
parents: 15693
diff changeset
31 ## The output @var{img} is of class uint8 if @var{n} is less than or
b1cd65881592 Clean up scripts in image directory.
Rik <rik@octave.org>
parents: 15693
diff changeset
32 ## equal to 256; Otherwise the return class is uint16.
15693
a1b634240352 maint: merge default into image-overhaul head, specially changeset 806ea52. Resolving many conflicts and fixing bugs related to correctly indexing on image class (float vs integer have different offset)
Carnë Draug <carandraug+dev@gmail.com>
parents: 15691 15683
diff changeset
33 ## @seealso{ind2gray, rgb2ind}
3373
36405da8e173 [project @ 1999-11-23 20:54:17 by jwe]
jwe
parents: 3202
diff changeset
34 ## @end deftypefn
1024
56520a75b5b3 [project @ 1995-01-11 20:30:04 by jwe]
jwe
parents: 559
diff changeset
35
3202
44d82b369c78 [project @ 1998-10-29 20:27:57 by jwe]
jwe
parents: 2847
diff changeset
36 ## Author: Tony Richardson <arichard@stark.cc.oh.us>
2312
204cc7db6f4a [project @ 1996-07-11 21:20:36 by jwe]
jwe
parents: 2311
diff changeset
37 ## Created: July 1994
204cc7db6f4a [project @ 1996-07-11 21:20:36 by jwe]
jwe
parents: 2311
diff changeset
38 ## Adapted-By: jwe
1024
56520a75b5b3 [project @ 1995-01-11 20:30:04 by jwe]
jwe
parents: 559
diff changeset
39
15693
a1b634240352 maint: merge default into image-overhaul head, specially changeset 806ea52. Resolving many conflicts and fixing bugs related to correctly indexing on image class (float vs integer have different offset)
Carnë Draug <carandraug+dev@gmail.com>
parents: 15691 15683
diff changeset
40 function [I, map] = gray2ind (I, n = 64)
15683
806ea52af230 Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents: 14868
diff changeset
41
1024
56520a75b5b3 [project @ 1995-01-11 20:30:04 by jwe]
jwe
parents: 559
diff changeset
42 if (nargin < 1 || nargin > 2)
6046
34f96dd5441b [project @ 2006-10-10 16:10:25 by jwe]
jwe
parents: 5307
diff changeset
43 print_usage ();
15683
806ea52af230 Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents: 14868
diff changeset
44 elseif (! isreal (I) || issparse (I))
806ea52af230 Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents: 14868
diff changeset
45 error ("gray2ind: I must be a grayscale or binary image");
806ea52af230 Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents: 14868
diff changeset
46 elseif (! isscalar (n) || n < 1 || n > 65536)
806ea52af230 Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents: 14868
diff changeset
47 error ("gray2ind: N must be a positive integer in the range [1, 65536]");
17710
3dec0a57ab55 gray2ind.m: Enable handling of ND images.
Adam H Aitkenhead <adamhaitkenhead@gmail.com>
parents: 15714
diff changeset
48 elseif (! ismatrix (I) || ndims (I) < 2)
15714
b1cd65881592 Clean up scripts in image directory.
Rik <rik@octave.org>
parents: 15693
diff changeset
49 error ("gray2ind: I must be a grayscale or binary image");
7375
4fbfce35012a [project @ 2008-01-15 01:04:06 by jwe]
jwe
parents: 7017
diff changeset
50 endif
15690
7d21456c09d1 gray2ind: also accept binary images and default n to 2 in such cases
Carnë Draug <carandraug+dev@gmail.com>
parents: 14868
diff changeset
51
7d21456c09d1 gray2ind: also accept binary images and default n to 2 in such cases
Carnë Draug <carandraug+dev@gmail.com>
parents: 14868
diff changeset
52 ## default n is different if image is logical
15693
a1b634240352 maint: merge default into image-overhaul head, specially changeset 806ea52. Resolving many conflicts and fixing bugs related to correctly indexing on image class (float vs integer have different offset)
Carnë Draug <carandraug+dev@gmail.com>
parents: 15691 15683
diff changeset
53 if (nargin == 1 && islogical (I))
15690
7d21456c09d1 gray2ind: also accept binary images and default n to 2 in such cases
Carnë Draug <carandraug+dev@gmail.com>
parents: 14868
diff changeset
54 n = 2;
7d21456c09d1 gray2ind: also accept binary images and default n to 2 in such cases
Carnë Draug <carandraug+dev@gmail.com>
parents: 14868
diff changeset
55 endif
7d21456c09d1 gray2ind: also accept binary images and default n to 2 in such cases
Carnë Draug <carandraug+dev@gmail.com>
parents: 14868
diff changeset
56
15683
806ea52af230 Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents: 14868
diff changeset
57 cls = class (I);
19833
9fc020886ae9 maint: Clean up m-files to follow Octave coding conventions.
Rik <rik@octave.org>
parents: 19769
diff changeset
58 if (! any (strcmp (cls, {"logical", "uint8", "uint16", "int16", ...
9fc020886ae9 maint: Clean up m-files to follow Octave coding conventions.
Rik <rik@octave.org>
parents: 19769
diff changeset
59 "single", "double"})))
15683
806ea52af230 Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents: 14868
diff changeset
60 error ("gray2ind: invalid data type '%s'", cls);
15693
a1b634240352 maint: merge default into image-overhaul head, specially changeset 806ea52. Resolving many conflicts and fixing bugs related to correctly indexing on image class (float vs integer have different offset)
Carnë Draug <carandraug+dev@gmail.com>
parents: 15691 15683
diff changeset
61 elseif (isfloat (I) && (min (I(:) < 0) || max (I(:) > 1)))
7375
4fbfce35012a [project @ 2008-01-15 01:04:06 by jwe]
jwe
parents: 7017
diff changeset
62 error ("gray2ind: floating point images may only contain values between 0 and 1");
559
4e826edfbc56 [project @ 1994-07-25 22:18:28 by jwe]
jwe
parents:
diff changeset
63 endif
4e826edfbc56 [project @ 1994-07-25 22:18:28 by jwe]
jwe
parents:
diff changeset
64
1024
56520a75b5b3 [project @ 1995-01-11 20:30:04 by jwe]
jwe
parents: 559
diff changeset
65 map = gray (n);
15683
806ea52af230 Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents: 14868
diff changeset
66
806ea52af230 Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents: 14868
diff changeset
67 ## Set up scale factor
806ea52af230 Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents: 14868
diff changeset
68 if (isinteger (I))
15693
a1b634240352 maint: merge default into image-overhaul head, specially changeset 806ea52. Resolving many conflicts and fixing bugs related to correctly indexing on image class (float vs integer have different offset)
Carnë Draug <carandraug+dev@gmail.com>
parents: 15691 15683
diff changeset
69 low = double (intmin (cls));
a1b634240352 maint: merge default into image-overhaul head, specially changeset 806ea52. Resolving many conflicts and fixing bugs related to correctly indexing on image class (float vs integer have different offset)
Carnë Draug <carandraug+dev@gmail.com>
parents: 15691 15683
diff changeset
70 scale = double (intmax (cls)) - low;
a1b634240352 maint: merge default into image-overhaul head, specially changeset 806ea52. Resolving many conflicts and fixing bugs related to correctly indexing on image class (float vs integer have different offset)
Carnë Draug <carandraug+dev@gmail.com>
parents: 15691 15683
diff changeset
71 I = double (I) - low;
15683
806ea52af230 Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents: 14868
diff changeset
72 else
15693
a1b634240352 maint: merge default into image-overhaul head, specially changeset 806ea52. Resolving many conflicts and fixing bugs related to correctly indexing on image class (float vs integer have different offset)
Carnë Draug <carandraug+dev@gmail.com>
parents: 15691 15683
diff changeset
73 scale = 1;
7375
4fbfce35012a [project @ 2008-01-15 01:04:06 by jwe]
jwe
parents: 7017
diff changeset
74 endif
15714
b1cd65881592 Clean up scripts in image directory.
Rik <rik@octave.org>
parents: 15693
diff changeset
75 I *= (n-1)/scale;
b1cd65881592 Clean up scripts in image directory.
Rik <rik@octave.org>
parents: 15693
diff changeset
76
15683
806ea52af230 Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents: 14868
diff changeset
77 ## Note: no separate call to round () necessary because
806ea52af230 Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents: 14868
diff changeset
78 ## type conversion does that automatically.
19769
70911df8ad28 gray2ind: return uint8 when (n <= 256) instead of (n < 256) (bug #44309)
Carnë Draug <carandraug@octave.org>
parents: 19697
diff changeset
79 if (n <= 256)
15693
a1b634240352 maint: merge default into image-overhaul head, specially changeset 806ea52. Resolving many conflicts and fixing bugs related to correctly indexing on image class (float vs integer have different offset)
Carnë Draug <carandraug+dev@gmail.com>
parents: 15691 15683
diff changeset
80 I = uint8 (I);
15714
b1cd65881592 Clean up scripts in image directory.
Rik <rik@octave.org>
parents: 15693
diff changeset
81 else
15693
a1b634240352 maint: merge default into image-overhaul head, specially changeset 806ea52. Resolving many conflicts and fixing bugs related to correctly indexing on image class (float vs integer have different offset)
Carnë Draug <carandraug+dev@gmail.com>
parents: 15691 15683
diff changeset
82 I = uint16 (I);
15683
806ea52af230 Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents: 14868
diff changeset
83 endif
15714
b1cd65881592 Clean up scripts in image directory.
Rik <rik@octave.org>
parents: 15693
diff changeset
84
559
4e826edfbc56 [project @ 1994-07-25 22:18:28 by jwe]
jwe
parents:
diff changeset
85 endfunction
15683
806ea52af230 Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents: 14868
diff changeset
86
15714
b1cd65881592 Clean up scripts in image directory.
Rik <rik@octave.org>
parents: 15693
diff changeset
87
15693
a1b634240352 maint: merge default into image-overhaul head, specially changeset 806ea52. Resolving many conflicts and fixing bugs related to correctly indexing on image class (float vs integer have different offset)
Carnë Draug <carandraug+dev@gmail.com>
parents: 15691 15683
diff changeset
88 %!assert (gray2ind ([0 0.25 0.5 1]), uint8 ([0 16 32 63]))
a1b634240352 maint: merge default into image-overhaul head, specially changeset 806ea52. Resolving many conflicts and fixing bugs related to correctly indexing on image class (float vs integer have different offset)
Carnë Draug <carandraug+dev@gmail.com>
parents: 15691 15683
diff changeset
89 %!assert (gray2ind ([0 0.25 0.5 1], 400), uint16 ([0 100 200 399]))
a1b634240352 maint: merge default into image-overhaul head, specially changeset 806ea52. Resolving many conflicts and fixing bugs related to correctly indexing on image class (float vs integer have different offset)
Carnë Draug <carandraug+dev@gmail.com>
parents: 15691 15683
diff changeset
90 %!assert (gray2ind (logical ([1 0 0 1])), uint8 ([1 0 0 1]))
a1b634240352 maint: merge default into image-overhaul head, specially changeset 806ea52. Resolving many conflicts and fixing bugs related to correctly indexing on image class (float vs integer have different offset)
Carnë Draug <carandraug+dev@gmail.com>
parents: 15691 15683
diff changeset
91 %!assert (gray2ind (uint8 ([0 64 128 192 255])), uint8 ([0 16 32 47 63]))
15683
806ea52af230 Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents: 14868
diff changeset
92
806ea52af230 Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents: 14868
diff changeset
93 %!test
806ea52af230 Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents: 14868
diff changeset
94 %! i2g = ind2gray (1:100, gray (100));
806ea52af230 Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents: 14868
diff changeset
95 %! g2i = gray2ind (i2g, 100);
15693
a1b634240352 maint: merge default into image-overhaul head, specially changeset 806ea52. Resolving many conflicts and fixing bugs related to correctly indexing on image class (float vs integer have different offset)
Carnë Draug <carandraug+dev@gmail.com>
parents: 15691 15683
diff changeset
96 %! assert (g2i, uint8 (0:99));
15683
806ea52af230 Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents: 14868
diff changeset
97
19769
70911df8ad28 gray2ind: return uint8 when (n <= 256) instead of (n < 256) (bug #44309)
Carnë Draug <carandraug@octave.org>
parents: 19697
diff changeset
98 %!assert (gray2ind ([0 0.25 0.5 1], 256), uint8 ([0 64 128 255]))
70911df8ad28 gray2ind: return uint8 when (n <= 256) instead of (n < 256) (bug #44309)
Carnë Draug <carandraug@octave.org>
parents: 19697
diff changeset
99 %!assert (gray2ind ([0 (1/511) (1/510) 1-(1/509) 1-(1/510) 1], 256),
70911df8ad28 gray2ind: return uint8 when (n <= 256) instead of (n < 256) (bug #44309)
Carnë Draug <carandraug@octave.org>
parents: 19697
diff changeset
100 %! uint8 ([0 0 1 254 255 255]))
70911df8ad28 gray2ind: return uint8 when (n <= 256) instead of (n < 256) (bug #44309)
Carnë Draug <carandraug@octave.org>
parents: 19697
diff changeset
101
70911df8ad28 gray2ind: return uint8 when (n <= 256) instead of (n < 256) (bug #44309)
Carnë Draug <carandraug@octave.org>
parents: 19697
diff changeset
102 %!test
70911df8ad28 gray2ind: return uint8 when (n <= 256) instead of (n < 256) (bug #44309)
Carnë Draug <carandraug@octave.org>
parents: 19697
diff changeset
103 %! assert (class (gray2ind ([0.0 0.5 1.0], 255)), "uint8")
70911df8ad28 gray2ind: return uint8 when (n <= 256) instead of (n < 256) (bug #44309)
Carnë Draug <carandraug@octave.org>
parents: 19697
diff changeset
104 %! assert (class (gray2ind ([0.0 0.5 1.0], 256)), "uint8")
70911df8ad28 gray2ind: return uint8 when (n <= 256) instead of (n < 256) (bug #44309)
Carnë Draug <carandraug@octave.org>
parents: 19697
diff changeset
105 %! assert (class (gray2ind ([0.0 0.5 1.0], 257)), "uint16")
70911df8ad28 gray2ind: return uint8 when (n <= 256) instead of (n < 256) (bug #44309)
Carnë Draug <carandraug@octave.org>
parents: 19697
diff changeset
106
19833
9fc020886ae9 maint: Clean up m-files to follow Octave coding conventions.
Rik <rik@octave.org>
parents: 19769
diff changeset
107 ## Test input validation
15683
806ea52af230 Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents: 14868
diff changeset
108 %!error gray2ind ()
806ea52af230 Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents: 14868
diff changeset
109 %!error gray2ind (1,2,3)
806ea52af230 Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents: 14868
diff changeset
110 %!error <I must be a grayscale or binary image> gray2ind ({1})
806ea52af230 Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents: 14868
diff changeset
111 %!error <I must be a grayscale or binary image> gray2ind ([1+i])
806ea52af230 Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents: 14868
diff changeset
112 %!error <I must be a grayscale or binary image> gray2ind (sparse ([1]))
806ea52af230 Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents: 14868
diff changeset
113 %!error <N must be a positive integer> gray2ind (1, ones (2,2))
806ea52af230 Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents: 14868
diff changeset
114 %!error <N must be a positive integer> gray2ind (1, 0)
806ea52af230 Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents: 14868
diff changeset
115 %!error <N must be a positive integer> gray2ind (1, 65537)
806ea52af230 Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents: 14868
diff changeset
116 %!error <invalid data type> gray2ind (uint32 (1))
806ea52af230 Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents: 14868
diff changeset
117 %!error <values between 0 and 1> gray2ind (-1)
806ea52af230 Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents: 14868
diff changeset
118 %!error <values between 0 and 1> gray2ind (2)
806ea52af230 Overhaul m-files in image directory to provide better support for images stored as integers.
Rik <rik@octave.org>
parents: 14868
diff changeset
119