1Pamtooctaveimg User Manual(0)                    Pamtooctaveimg User Manual(0)
2
3
4
5       " "netpbm documentation"
6

NAME

8       pamtooctaveimg - convert a Netpbm image to a GNU Octave image
9
10

SYNOPSIS

12       pamtooctaveimg [netpbmfile]
13
14

DESCRIPTION

16       This program is part of Netpbm(1).
17
18       pamtooctaveimg  reads a Netpbm image as input and produces a GNU Octave
19http://www.octave.org/⟩  image file as output.
20
21       An Octave image file (called "Octave's image format" in Octave documen‐
22       tation)  is  a  particular  kind of Octave data file.  It describes two
23       matrices:
24
25
26
27       ·      the image itself as a list of indexes into a colormap, and
28
29       ·      the corresponding colormap as  a  list  of  {red,  green,  blue}
30              triplets.
31
32
33       An  Octave  data file is an ASCII text file that you use to import data
34       to Octave.
35
36       See the
37        Image                        Processing                        chapter
38http://www.gnu.org/software/octave/doc/interpreter/Image-
39       Processing.html#Image-Processing⟩    of  the  GNU  Octave  manual   for
40       details.
41
42       pamtooctaveimg writes the output Octave image to Standard Output.
43
44

Arguments

46       netpbmfile  is  the  name  of  the file containing the input PNM or PAM
47       image, or - to indicate Standard Input.  If you don't  specify  netpbm‐
48       file,  the  input is from Standard Input.  pamtooctaveimg converts only
49       the first image in the input stream.
50
51
52

Examples

54          % pamtooctaveimg myimage.ppm > myimage.img
55          % octave
56          > [img,map] = loadimage("myimage.img");
57
58          # (At this point, img is an X by Y matrix and map is a 3 by M matrix.)
59
60          > imshow(img,map);   # Displays img with colormap map
61          > [r,g,b] = ind2rgb(img,map);
62
63          # (r, g, and b are now each X by Y matrices of color levels [0 to 1].)
64
65          > [newimg,newmap] = rgb2ind(r,b,g);   # Swap the blue and green channels.
66          > saveimage("newimage.ppm", newimg, "ppm", newmap);  # Save as a PPM file.
67
68
69

NOTES

71       There is no octavetopam program.  However, GNU Octave's saveimage  com‐
72       mand can save images in PPM format.
73
74
75

HISTORY

77       pamtooctaveimg was new in Netpbm 10.39 (June 2007).
78
79
80

SEE ALSO

82       octave(1), pam(1).
83
84

AUTHOR

86       Copyright (C) 2007 Scott Pakin, scott+pbm@pakin.org.
87

DOCUMENT SOURCE

89       This  manual  page was generated by the Netpbm tool 'makeman' from HTML
90       source.  The master documentation is at
91
92              http://netpbm.sourceforge.net/doc/pamtooctaveimg.html
93
94                                 27 June 2007    Pamtooctaveimg User Manual(0)
Impressum