| 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 "Ppmcie User Manual" 1 "31 July 2005" "netpbm documentation" |
| 7 |
|
| 8 |
.SH NAME |
| 9 |
|
| 10 |
ppmcie - draw a CIE color chart as a PPM image |
| 11 |
|
| 12 |
.UN synopsis |
| 13 |
.SH SYNOPSIS |
| 14 |
|
| 15 |
\fBppmcie\fP |
| 16 |
|
| 17 |
[ |
| 18 |
\fB-rec709\fP|\fB-cie\fP|\fB-ebu\fP|\fB-hdtv\fP|\fB-ntsc\fP|\fB-smpte\fP |
| 19 |
] |
| 20 |
[\fB-xy\fP|\fB-upvp\fP] |
| 21 |
|
| 22 |
[\fB-red\fP \fIrx\fP \fIry\fP] |
| 23 |
|
| 24 |
[\fB-green\fP \fIgx\fP \fIgy\fP] |
| 25 |
|
| 26 |
[\fB-blue\fP \fIbx\fP \fIby\fP] |
| 27 |
|
| 28 |
[\fB-white\fP \fIwx\fP \fIwy\fP] |
| 29 |
|
| 30 |
[\fB-size\fP \fIedge\fP] |
| 31 |
|
| 32 |
[{\fB-xsize\fP|\fB-width\fP} \fIwidth\fP] |
| 33 |
|
| 34 |
[{\fB-ysize\fP|\fB-height\fP} \fIheight\fP] |
| 35 |
|
| 36 |
[\fB-noblack\fP] |
| 37 |
[\fB-nowpoint\fP] |
| 38 |
[\fB-nolabel\fP] |
| 39 |
[\fB-noaxes\fP] |
| 40 |
[\fB-full\fP] |
| 41 |
|
| 42 |
.UN description |
| 43 |
.SH DESCRIPTION |
| 44 |
.PP |
| 45 |
This program is part of |
| 46 |
.BR "Netpbm" (1)\c |
| 47 |
\&. |
| 48 |
|
| 49 |
\fBppmcie\fP creates a PPM file containing a plot of the CIE |
| 50 |
"tongue" color chart -- to the extent possible in a PPM |
| 51 |
image. Alternatively, creates a pseudo-PPM image of the color tongue |
| 52 |
using RGB values from a color system of your choice. |
| 53 |
.PP |
| 54 |
The CIE color tongue is an image of all the hues that can be described |
| 55 |
by CIE X-Y chromaticity coordinates. They are arranged on a two |
| 56 |
dimensional coordinate plane with the X chromaticity on the horizontal |
| 57 |
axis and the Y chromaticity on the vertical scale. (You can choose |
| 58 |
alternatively to use CIE u'-v' chromaticity coordinates, but the |
| 59 |
general idea of the color tongue is the same). |
| 60 |
.PP |
| 61 |
Note that the PPM format specifies that the RGB values in the file are |
| 62 |
from the ITU-R Recommendation BT.709 color system, gamma-corrected. |
| 63 |
And positive. See |
| 64 |
.BR "ppm" (1)\c |
| 65 |
\& for details. If |
| 66 |
you use one of the color system options on \fBppmcie\fP, what you get |
| 67 |
is not a true PPM image, but is very similar. If you display such |
| 68 |
\fBppmcie\fP output using a device that expects PPM input (which |
| 69 |
includes just about any computer graphics display program), it will |
| 70 |
display the wrong colors. |
| 71 |
.PP |
| 72 |
However, you may have a device that expects one of these variations on |
| 73 |
PPM. |
| 74 |
.PP |
| 75 |
In every RGB color system you can specify, including the default |
| 76 |
(which produces a true PPM image) there are hues in the color tongue |
| 77 |
that can't be represented. For example, monochromatic blue-green with |
| 78 |
a wavelength of 500nm cannot be represented in a PPM image. |
| 79 |
.PP |
| 80 |
For these hues, \fBppmcie\fP substitutes a similar hue as follows: |
| 81 |
They are desaturated and rendered as the shade where the edge of the |
| 82 |
Maxwell triangle intersects a line drawn from the requested shade to |
| 83 |
the white point defined by the color system's white point. |
| 84 |
Furthermore, unless you specify the \fB-full\fP option, \fBppmcie\fP |
| 85 |
reduces their intensity by 25% compared to the true hues in the image. |
| 86 |
.PP |
| 87 |
\fBppmcie\fP draws and labels the CIE X-Y coordinate axes unless you |
| 88 |
choose otherwise with options. |
| 89 |
.PP |
| 90 |
\fBppmcie\fP draws the Maxwell triangle for the color system in use |
| 91 |
on the color tongue. The Maxwell triangle is the triangle whose |
| 92 |
vertices are the primary illuminant hues for the color system. The |
| 93 |
hues inside the triangle show the color gamut for the color system. |
| 94 |
They are also the only ones that are correct for the CIE X-Y |
| 95 |
chromaticity coordinates shown. (See explanation above). \fBppmcie\fP |
| 96 |
denotes the Maxwell triangle by rendering it at full brightness, while |
| 97 |
rendering the rest of the color tongue as 3/4 brightness. You can turn |
| 98 |
this off with options. |
| 99 |
.PP |
| 100 |
\fBppmcie\fP also places a black cross at the color system's white |
| 101 |
point (with the center of the cross open so you can actually see the |
| 102 |
white color) and displays in text the CIE X-Y chromaticities of the |
| 103 |
primary illuminants and white point for the color system. You can |
| 104 |
turn this off with options, though. |
| 105 |
.PP |
| 106 |
\fBppmcie\fP annotates the periphery of the color tongue with the |
| 107 |
wavelength, in nanometers of the monochromatic hues which appear |
| 108 |
there. |
| 109 |
.PP |
| 110 |
\fBppmcie\fP displays the black body chromaticity curve for Planckian |
| 111 |
radiators from 1000 to 30000 kelvins on the image. This curve traces the |
| 112 |
colors of black bodies as various temperatures. |
| 113 |
.PP |
| 114 |
You can choose from several standard color systems, or specify one of |
| 115 |
your own numerically. |
| 116 |
.PP |
| 117 |
CIE charts, by their very nature, contain a very large number of |
| 118 |
colors. If you're encoding the chart for a color mapped device or |
| 119 |
file format, you'll need to use \fBpnmquant\fP or \fBppmdither\fP to |
| 120 |
reduce the number of colors in the image. |
| 121 |
|
| 122 |
.UN options |
| 123 |
.SH OPTIONS |
| 124 |
.PP |
| 125 |
In addition to the options common to all programs based on libnetpbm |
| 126 |
(most notably \fB-quiet\fP, see |
| 127 |
.UR index.html#commonoptions |
| 128 |
Common Options |
| 129 |
.UE |
| 130 |
\&), \fBppmcie\fP recognizes the following |
| 131 |
command line options: |
| 132 |
.PP |
| 133 |
You may abbreviate any option to its shortest unique prefix. |
| 134 |
|
| 135 |
|
| 136 |
.TP |
| 137 |
\fB-rec709\fP |
| 138 |
.TP |
| 139 |
\fB-cie\fP |
| 140 |
.TP |
| 141 |
\fB-ebu\fP |
| 142 |
.TP |
| 143 |
\fB-hdtv\fP |
| 144 |
.TP |
| 145 |
\fB-ntsc\fP |
| 146 |
.TP |
| 147 |
\fB-smpte\fP |
| 148 |
Select a standard color system whose gamut to plot. The default is |
| 149 |
\fB-rec709\fP, which chooses ITU-R Recommendation BT.709, |
| 150 |
gamma-corrected. This is the only color system for which |
| 151 |
\fBppmcie\fP's output is a true PPM image. See explanation above. |
| 152 |
\fB-ebu\fP chooses the primaries used in the PAL and SECAM |
| 153 |
broadcasting standards. \fB-ntsc\fP chooses the primaries specified |
| 154 |
by the NTSC broadcasting system (few modern monitors actually cover |
| 155 |
this range). \fB-smpte\fP selects the primaries recommended by the |
| 156 |
Society of Motion Picture and Television Engineers (SMPTE) in |
| 157 |
standards RP-37 and RP-145, and \fB-hdtv\fP uses the much broader |
| 158 |
\fIHDTV ideal\fP primaries. \fB-cie\fP chooses a color system that |
| 159 |
has the largest possible gamut within the spectrum of the chart. This |
| 160 |
is the same color system as you get with the \fB-cie\fP option to |
| 161 |
John Walker's \fBcietoppm\fP program. |
| 162 |
|
| 163 |
.TP |
| 164 |
\fB-xy\fP |
| 165 |
plot CIE 1931 x y chromaticities. This is the default. |
| 166 |
|
| 167 |
.TP |
| 168 |
\fB-upvp\fP |
| 169 |
plot u' v' 1976 chromaticities rather than CIE 1931 x y |
| 170 |
chromaticities. The advantage of u' v' coordinates is that equal |
| 171 |
intervals of distance on the u' v' plane correspond roughly to the |
| 172 |
eye's ability to discriminate colors. |
| 173 |
|
| 174 |
.TP |
| 175 |
\fB-red\fP\fI rx ry\fP |
| 176 |
specifies the CIE \fIx\fP and \fIy\fP co-ordinates of the red |
| 177 |
illuminant of a custom color system and selects the custom system. |
| 178 |
|
| 179 |
.TP |
| 180 |
\fB-green\fP\fI gx gy\fP |
| 181 |
specifies the CIE \fIx\fP and \fIy\fP co-ordinates of the green |
| 182 |
illuminant of the color system and selects the custom system. |
| 183 |
|
| 184 |
.TP |
| 185 |
\fB-blue\fP\fI bx by\fP |
| 186 |
specifies the CIE \fIx\fP and \fIy\fP co-ordinates of the blue |
| 187 |
illuminant of the color system and selects the custom system. |
| 188 |
|
| 189 |
.TP |
| 190 |
\fB-white\fP\fI wx wy\fP |
| 191 |
specifies the CIE \fIx\fP and \fIy\fP co-ordinates of the white |
| 192 |
point of the color system and selects the custom system. |
| 193 |
|
| 194 |
.TP |
| 195 |
\fB-size\fP\fI edge\fP |
| 196 |
Create an image of \fIedge\fP by \fIedge\fP pixels. The default is |
| 197 |
512x512. |
| 198 |
|
| 199 |
.TP |
| 200 |
\fB-xsize|-width\fP\fI width\fP |
| 201 |
Sets the width of the generated image to \fIwidth\fP pixels. The |
| 202 |
default width is 512 pixels. If the height and width of the image are |
| 203 |
not the same, the CIE diagram will be stretched in the longer |
| 204 |
dimension. |
| 205 |
|
| 206 |
.TP |
| 207 |
\fB-ysize|-height\fP\fI height\fP |
| 208 |
Sets the height of the generated image to \fIheight\fP pixels. The |
| 209 |
default height is 512 pixels. If the height and width of the image |
| 210 |
are not the same, the CIE diagram will be stretched in the longer |
| 211 |
dimension. |
| 212 |
|
| 213 |
.TP |
| 214 |
\fB-noblack\fP |
| 215 |
Don't plot the black body chromaticity curve. |
| 216 |
|
| 217 |
.TP |
| 218 |
\fB-nowpoint\fP |
| 219 |
Don't plot the color system's white point. |
| 220 |
|
| 221 |
.TP |
| 222 |
\fB-nolabel\fP |
| 223 |
Omit the label. |
| 224 |
|
| 225 |
.TP |
| 226 |
\fB-noaxes\fP |
| 227 |
Don't plot axes. |
| 228 |
|
| 229 |
.TP |
| 230 |
\fB-full\fP |
| 231 |
Plot the entire CIE tongue in full brightness; don't dim the part |
| 232 |
which is outside the gamut of the specified color system (i.e. outside |
| 233 |
the Maxwell triangle). |
| 234 |
|
| 235 |
|
| 236 |
|
| 237 |
.UN interpretation |
| 238 |
.SH INTERPRETATION OF COLOR CHART |
| 239 |
.PP |
| 240 |
A color spectrum is a linear combination of one or more monochromatic |
| 241 |
colors. |
| 242 |
.PP |
| 243 |
A color is a set of color spectra that all look the same to the |
| 244 |
human eye (and brain). Actually, for the purposes of the definition, |
| 245 |
we assume the eye has infinite precision, so we can call two color |
| 246 |
spectra different colors even though they're so close a person |
| 247 |
couldn't possibly tell them apart. |
| 248 |
.PP |
| 249 |
The eye contains 3 kinds of color receptors (cones). Each has a |
| 250 |
different response to the various monochromatic colors. One kind |
| 251 |
responds most strongly to blue, another red, another green. Because |
| 252 |
there are only three, many different color spectra will excite the |
| 253 |
cones at exactly the same level, so the eye cannot tell them apart. |
| 254 |
All such spectra that excite the cones in the same way are a single |
| 255 |
color. |
| 256 |
.PP |
| 257 |
Each point in the color tongue represents a unique color. But |
| 258 |
there are an infinite number of color spectra in the set that is that |
| 259 |
color; i.e. an infinite number of color spectra that would look to you |
| 260 |
like this point. A machine could tell them apart, but you could not. |
| 261 |
.PP |
| 262 |
Remember that the colors outside the highlighted triangle are |
| 263 |
approximations of the real colors because the PPM format cannot |
| 264 |
represent them (and your display device probably cannot display them). |
| 265 |
That is, unless you're using a variation of PPM and a special display |
| 266 |
device, as discussed earlier in this manual. |
| 267 |
.PP |
| 268 |
A color is always relative to some given maximum brightness. A |
| 269 |
particular beam of light looks lime green if in a dim field, but |
| 270 |
pea green if in a bright field. An image on a movie screen may |
| 271 |
look pitch black because the projector is not shining any light on |
| 272 |
it, but when you turn off the projector and look at the same spot in |
| 273 |
room light, the screen looks quite white. The same light from that spot |
| 274 |
hit your eye with the project on as with it off. |
| 275 |
.PP |
| 276 |
The chart shows two dimensions of color. The third is intensity. |
| 277 |
All the colors in the chart have the same intensity. To get all |
| 278 |
possible colors in the gamut, Make copies of the whole chart at every |
| 279 |
intensity between zero and the maximum. |
| 280 |
.PP |
| 281 |
The edge of the tongue consists of all the monochromatic colors. |
| 282 |
A monochromatic color is one with a single wavelength. I.e. a color |
| 283 |
that is in a rainbow. The numbers you see are the wavelengths in |
| 284 |
nanometers. |
| 285 |
.PP |
| 286 |
Any straight line segment within the tongue contains colors which |
| 287 |
are linear combinations of two colors -- the colors at either end of |
| 288 |
the line segment. |
| 289 |
.PP |
| 290 |
Any color in the chart can be created from two other colors (actually, |
| 291 |
from any of an infinite number of pairs of other colors). |
| 292 |
.PP |
| 293 |
All the colors within a triangle inside the tongue can be created |
| 294 |
from a linear combination of the colors at the vertices of that triangle. |
| 295 |
.PP |
| 296 |
Any color in the tongue can be created from at most 3 monochromatic |
| 297 |
colors. |
| 298 |
.PP |
| 299 |
The highlighted triangle shows the colors that can be expressed |
| 300 |
in the tristimulus color system you chose. (ITU-R BT.709 by default). |
| 301 |
The corners of the triangle are the 3 primary illuminants in that |
| 302 |
system (a certain red, green, and blue for BT.709). The edges of |
| 303 |
the triangle, then, represent the colors you can represent with two |
| 304 |
of the primary illuminants (saturated colors), and the interior colors |
| 305 |
require all three primary illuminants (are not saturated). |
| 306 |
.PP |
| 307 |
In the ITU-R BT.709 color system (the default), the white point is |
| 308 |
defined as D65, which is (and is named after) the color of a black |
| 309 |
body at 6502 kelvins. Therefore, you should see the temperature curve |
| 310 |
on the image pass through the white part of the image, and the cross |
| 311 |
that marks the white point, at 6502 kelvins. |
| 312 |
.PP |
| 313 |
D65 white is supposed to be the color of the sun. If you have a |
| 314 |
perfect BT.709 display device, you should see the color of the sun |
| 315 |
at the white point cross. That's an important color, because when you |
| 316 |
look at an object in sunlight, the color that reflects of the object |
| 317 |
is based on the color of sunlight. Note that the sun produces a |
| 318 |
particular color spectrum, but many other color spectra are the same |
| 319 |
color, and display devices never use the actual color spectrum of the |
| 320 |
sun. |
| 321 |
.PP |
| 322 |
The colors at the corners of the triangle have the chromaticities |
| 323 |
phosphors in a monitor that uses the selected color system. Note |
| 324 |
that in BT.709 they are very close to monochromatic red, green, |
| 325 |
and blue, but not quite. That's why you can't display even one true |
| 326 |
color of the rainbow on a video monitor. |
| 327 |
.PP |
| 328 |
Remember that the chart shows colors of constant intensity, |
| 329 |
therefore the corners of the triangles are not the full colors of the |
| 330 |
primary illuminants, but only their chromaticities. In fact, the |
| 331 |
illuminants typically have different intensities. In BT.709, the |
| 332 |
blue primary illuminant is far more intense than the green, which is |
| 333 |
more intense than the red. Designers did this in order to make an |
| 334 |
equal combination of red, green, and blue generate gray. I.e. a |
| 335 |
combination of full strength red, full strength green, and full |
| 336 |
strength blue BT.709 primary illuminants is D65 white. |
| 337 |
.PP |
| 338 |
The tongue has a sharp straight edge at the bottom because that's |
| 339 |
the limit of human vision. There are colors below that line, but they |
| 340 |
involve infrared and ultraviolet light, so you can't see them. This |
| 341 |
line is called the "line of purples." |
| 342 |
|
| 343 |
.UN seealso |
| 344 |
.SH SEE ALSO |
| 345 |
.BR "ppmdither" (1)\c |
| 346 |
\&, |
| 347 |
.BR "pnmquant" (1)\c |
| 348 |
\&, |
| 349 |
.BR "ppm" (1)\c |
| 350 |
\& |
| 351 |
|
| 352 |
.UN author |
| 353 |
.SH AUTHOR |
| 354 |
.PP |
| 355 |
Copyright (C) 1995 by John Walker (\[email protected]\fP) |
| 356 |
.PP |
| 357 |
WWW home page: |
| 358 |
.UR http://www.fourmilab.ch/ |
| 359 |
http://www.fourmilab.ch/ |
| 360 |
.UE |
| 361 |
\& |
| 362 |
.PP |
| 363 |
Permission to use, copy, modify, and distribute this software and its |
| 364 |
documentation for any purpose and without fee is hereby granted, |
| 365 |
without any conditions or restrictions. This software is provided as |
| 366 |
is without express or implied warranty. |
| 367 |
.SH DOCUMENT SOURCE |
| 368 |
This manual page was generated by the Netpbm tool 'makeman' from HTML |
| 369 |
source. The master documentation is at |
| 370 |
.IP |
| 371 |
.B http://netpbm.sourceforge.net/doc/ppmcie.html |
| 372 |
.PP |