1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.3//EN">
<html><head><title>Pamgetcolor User Manual</title></head>
<body>
<h1>pamgetcolor</h1>
Updated: 18 May 2018
<br>
<a href="#index">Table Of Contents</a>
<h2>NAME</h2>
pamgetcolor - display the average colors from specified regions in an image.
<h2 id="synopsis">SYNOPSIS</h2>
<b>pamgetcolor</b>
[<b>-format</b> <i>format</i>]
[<b>-radius</b> <i>radius</i>]
[<b>-linear</b>]
[<b>-infile</b> <i>pamfile</i>]
<i>region1</i> [<i>region2</i> ...]
<h2 id="description">DESCRIPTION</h2>
<p>This program is part of <a href="index.html">Netpbm</a>.
<p><b>pamgetcolor</b> prints the average colors of a set of circular
regions in the input image.
<p>You specify a region as a positional argument of the form
<i>column</i>,<i>row</i>[:<i>label</i>], where <i>column</i> and <i>row</i>
are the coordinates of the center of the circle (first row of pixels is row 0;
leftmost column of pixels is column 0), and <i>label</i> an optional label
that <b>pamgetcolor</b> shall display to identify that region in its output.
All regions have he same radius, specified by the <b>-radius</b> option. The
region centers must lie within the image, but part of a region may fall
outside the image; <b>pamgetcolor</b> considers only the part that is within
the image in calculations.
<h2 id="examples">EXAMPLES</h2>
To read the color of the pixel at location (10,14) in the default
format:
<pre>
<kbd>
pamgetcolor 10,14 -infile test.ppm
</kbd>
</pre>
<p>To read the colors of three pixels in the default format, assigning a
label to each pixel:
<pre>
<kbd>
pamgetcolor 10,10:topleft 100,100:middle 200,200:bottomright -infile test.ppm
</kbd>
</pre>
<p>To read with 16-bit precision the average color in the circle with a radius
of four pixels and the center at (100,100):
<pre>
<kbd>
pamgetcolor -format int:65535 -radius 4 100,100 -infile test.ppm
</kbd>
</pre>
<h2 id="options">OPTIONS</h2>
<p>In addition to the options common to all programs based on libnetpbm
(most notably <b>-quiet</b>, see <a href="index.html#commonoptions">
Common Options</a>), <b>pamgetcolor</b> recognizes the following
command line options:
<dl>
<dt><b>-format</b>
<dd>This specifies the format in which to output the colors. The output is
always a <a href="libppm.html#colorname">Netpbm color specification</a>; this
format tells which of the various specifications for the same color the
program uses.
<p>
This argument is of the form <i>formatId</i>[:<i>param</i>], where
<i>formatId</i> specifies the format and <i>param</i> is a positive
integer parameter that, depending on <i>formatId</i>, indicates
either precision or normalization. The following values are possible for
<i>formatId</i>:
<dl>
<dt>int
<dd>Samples are decimal integers normalized to the maxval specified by
<i>param</i>. Example: <b>rgb-255:255/128/64</b>
This format is the default, with a maxval of 255.
<dt>norm
<dd>Samples are floating point numbers normalized to unity. E.g.
<b>rgbi:1.0/0.5/.25</b>
<i>param</i> specifies precision as the number of digits in the
fractional part.
<dt>x11
<dd>Samples are hexadecimal numbers with <i>param</i> digits,
e.g. <b>rgb:01/ff/8000</b>
</dl>
<dt><b>-radius</b>
<dd>sets the radius of the regions.
A value of zero causes <b>pamgetcolor</b> to measure a single pixel and
is the default.
<dt><b>-infile</b>
<dd>This specifies the Netpbm file to analyze.
<p>If you don't specify this option, <b>pamgetcolor</b> reads the image from
Standard Input.
<dt><b>-linear</b>
<dd>This tells <b>pamgetcolor</b> to work with the intensity-linear variation
of Netpbm images where the samples are proportional to light intensity rather
than to brightness, as in true (gamma-adjusted) Netpbm formats.
</dl>
<h2 id="seealso">SEE ALSO</h2>
<p><b><a href="pnmcolormap.html">pnmcolormap</a></b>,
<h2 id="author">AUTHOR</h2>
<p>This program was first submitted by Anton Shepelev
(<a href="mailto:anton.txt@gmail.com">anton.txt@gmail.com</a>).
<h2 id="history">HISTORY</h2>
<p>This program was new in Netpbm 10.83 (June 2018).
<h2 id="index">Table Of Contents</h2>
<ul>
<li><a href="#synopsis">SYNOPSIS</a>
<li><a href="#description">DESCRIPTION</a>
<li><a href="#examples">EXAMPLES</a>
<li><a href="#options">OPTIONS</a>
<li><a href="#seealso">SEE ALSO</a>
<li><a href="#author">AUTHOR</a>
<li><a href="#history">HISTORY</a>
</ul>
</body></html>
|