| 1 |
\ |
| 2 |
.\" This man page was generated by the Netpbm tool 'makeman' from HTML source. |
| 3 |
.\" Do not hand-hack it! If you have bug fixes or improvements, please find |
| 4 |
.\" the corresponding HTML page on the Netpbm website, generate a patch |
| 5 |
.\" against that, and send it to the Netpbm maintainer. |
| 6 |
.TH "Pamgetcolor User Manual" 1 "18 May 2018" "netpbm documentation" |
| 7 |
|
| 8 |
.SH NAME |
| 9 |
pamgetcolor - display the average colors from specified regions in an image. |
| 10 |
|
| 11 |
.UN synopsis |
| 12 |
.SH SYNOPSIS |
| 13 |
|
| 14 |
\fBpamgetcolor\fP |
| 15 |
[\fB-format\fP \fIformat\fP] |
| 16 |
[\fB-radius\fP \fIradius\fP] |
| 17 |
[\fB-linear\fP] |
| 18 |
[\fB-infile\fP \fIpamfile\fP] |
| 19 |
\fIregion1\fP [\fIregion2\fP ...] |
| 20 |
|
| 21 |
.UN description |
| 22 |
.SH DESCRIPTION |
| 23 |
.PP |
| 24 |
This program is part of |
| 25 |
.BR "Netpbm" (1)\c |
| 26 |
\&. |
| 27 |
.PP |
| 28 |
\fBpamgetcolor\fP prints the average colors of a set of circular |
| 29 |
regions in the input image. |
| 30 |
.PP |
| 31 |
You specify a region as a positional argument of the form |
| 32 |
\fIcolumn\fP,\fIrow\fP[:\fIlabel\fP], where \fIcolumn\fP and \fIrow\fP |
| 33 |
are the coordinates of the center of the circle (first row of pixels is row 0; |
| 34 |
leftmost column of pixels is column 0), and \fIlabel\fP an optional label |
| 35 |
that \fBpamgetcolor\fP shall display to identify that region in its output. |
| 36 |
All regions have he same radius, specified by the \fB-radius\fP option. The |
| 37 |
region centers must lie within the image, but part of a region may fall |
| 38 |
outside the image; \fBpamgetcolor\fP considers only the part that is within |
| 39 |
the image in calculations. |
| 40 |
|
| 41 |
|
| 42 |
.UN examples |
| 43 |
.SH EXAMPLES |
| 44 |
|
| 45 |
To read the color of the pixel at location (10,14) in the default |
| 46 |
format: |
| 47 |
|
| 48 |
.nf |
| 49 |
\f(CW |
| 50 |
pamgetcolor 10,14 -infile test.ppm |
| 51 |
\fP |
| 52 |
|
| 53 |
.fi |
| 54 |
.PP |
| 55 |
To read the colors of three pixels in the default format, assigning a |
| 56 |
label to each pixel: |
| 57 |
|
| 58 |
.nf |
| 59 |
\f(CW |
| 60 |
pamgetcolor 10,10:topleft 100,100:middle 200,200:bottomright -infile test.ppm |
| 61 |
\fP |
| 62 |
|
| 63 |
.fi |
| 64 |
.PP |
| 65 |
To read with 16-bit precision the average color in the circle with a radius |
| 66 |
of four pixels and the center at (100,100): |
| 67 |
|
| 68 |
.nf |
| 69 |
\f(CW |
| 70 |
pamgetcolor -format int:65535 -radius 4 100,100 -infile test.ppm |
| 71 |
\fP |
| 72 |
|
| 73 |
.fi |
| 74 |
|
| 75 |
|
| 76 |
.UN options |
| 77 |
.SH OPTIONS |
| 78 |
.PP |
| 79 |
In addition to the options common to all programs based on libnetpbm |
| 80 |
(most notably \fB-quiet\fP, see |
| 81 |
.UR index.html#commonoptions |
| 82 |
Common Options |
| 83 |
.UE |
| 84 |
\&), \fBpamgetcolor\fP recognizes the following |
| 85 |
command line options: |
| 86 |
|
| 87 |
|
| 88 |
|
| 89 |
.TP |
| 90 |
\fB-format\fP |
| 91 |
This specifies the format in which to output the colors. The output is |
| 92 |
always a |
| 93 |
.UR libppm.html#colorname |
| 94 |
Netpbm color specification |
| 95 |
.UE |
| 96 |
\&; this |
| 97 |
format tells which of the various specifications for the same color the |
| 98 |
program uses. |
| 99 |
.sp |
| 100 |
This argument is of the form \fIformatId\fP[:\fIparam\fP], where |
| 101 |
\fIformatId\fP specifies the format and \fIparam\fP is a positive |
| 102 |
integer parameter that, depending on \fIformatId\fP, indicates |
| 103 |
either precision or normalization. The following values are possible for |
| 104 |
\fIformatId\fP: |
| 105 |
|
| 106 |
.TP |
| 107 |
int |
| 108 |
Samples are decimal integers normalized to the maxval specified by |
| 109 |
\fIparam\fP. Example: \fBrgb-255:255/128/64\fP |
| 110 |
This format is the default, with a maxval of 255. |
| 111 |
.TP |
| 112 |
norm |
| 113 |
Samples are floating point numbers normalized to unity. E.g. |
| 114 |
\fBrgbi:1.0/0.5/.25\fP |
| 115 |
\fIparam\fP specifies precision as the number of digits in the |
| 116 |
fractional part. |
| 117 |
.TP |
| 118 |
x11 |
| 119 |
Samples are hexadecimal numbers with \fIparam\fP digits, |
| 120 |
e.g. \fBrgb:01/ff/8000\fP |
| 121 |
|
| 122 |
|
| 123 |
.TP |
| 124 |
\fB-radius\fP |
| 125 |
sets the radius of the regions. |
| 126 |
A value of zero causes \fBpamgetcolor\fP to measure a single pixel and |
| 127 |
is the default. |
| 128 |
|
| 129 |
.TP |
| 130 |
\fB-infile\fP |
| 131 |
This specifies the Netpbm file to analyze. |
| 132 |
.sp |
| 133 |
If you don't specify this option, \fBpamgetcolor\fP reads the image from |
| 134 |
Standard Input. |
| 135 |
|
| 136 |
.TP |
| 137 |
\fB-linear\fP |
| 138 |
This tells \fBpamgetcolor\fP to work with the intensity-linear variation |
| 139 |
of Netpbm images where the samples are proportional to light intensity rather |
| 140 |
than to brightness, as in true (gamma-adjusted) Netpbm formats. |
| 141 |
|
| 142 |
|
| 143 |
|
| 144 |
.UN seealso |
| 145 |
.SH SEE ALSO |
| 146 |
.PP |
| 147 |
.BR "pnmcolormap" (1)\c |
| 148 |
\&, |
| 149 |
|
| 150 |
|
| 151 |
.UN author |
| 152 |
.SH AUTHOR |
| 153 |
.PP |
| 154 |
This program was first submitted by Anton Shepelev |
| 155 |
(\[email protected]\fP). |
| 156 |
|
| 157 |
.UN history |
| 158 |
.SH HISTORY |
| 159 |
.PP |
| 160 |
This program was new in Netpbm 10.83 (June 2018). |
| 161 |
|
| 162 |
.UN index |
| 163 |
.SH Table Of Contents |
| 164 |
|
| 165 |
.IP \(bu |
| 166 |
.UR #synopsis |
| 167 |
SYNOPSIS |
| 168 |
.UE |
| 169 |
\& |
| 170 |
.IP \(bu |
| 171 |
.UR #description |
| 172 |
DESCRIPTION |
| 173 |
.UE |
| 174 |
\& |
| 175 |
.IP \(bu |
| 176 |
.UR #examples |
| 177 |
EXAMPLES |
| 178 |
.UE |
| 179 |
\& |
| 180 |
.IP \(bu |
| 181 |
.UR #options |
| 182 |
OPTIONS |
| 183 |
.UE |
| 184 |
\& |
| 185 |
.IP \(bu |
| 186 |
.UR #seealso |
| 187 |
SEE ALSO |
| 188 |
.UE |
| 189 |
\& |
| 190 |
.IP \(bu |
| 191 |
.UR #author |
| 192 |
AUTHOR |
| 193 |
.UE |
| 194 |
\& |
| 195 |
.IP \(bu |
| 196 |
.UR #history |
| 197 |
HISTORY |
| 198 |
.UE |
| 199 |
\& |
| 200 |
.SH DOCUMENT SOURCE |
| 201 |
This manual page was generated by the Netpbm tool 'makeman' from HTML |
| 202 |
source. The master documentation is at |
| 203 |
.IP |
| 204 |
.B http://netpbm.sourceforge.net/doc/pamgetcolor.html |
| 205 |
.PP |