| 1 |
greg |
1.10 |
.\" RCSid "$Id: pvalue.1,v 1.9 2019/07/15 22:39:50 greg Exp $"
|
| 2 |
greg |
1.1 |
.TH PVALUE 1 1/15/99 RADIANCE
|
| 3 |
|
|
.SH NAME
|
| 4 |
|
|
pvalue - convert RADIANCE picture to/from alternate formats
|
| 5 |
|
|
.SH SYNOPSIS
|
| 6 |
|
|
.B pvalue
|
| 7 |
|
|
[
|
| 8 |
|
|
.B options
|
| 9 |
|
|
]
|
| 10 |
|
|
[
|
| 11 |
|
|
.B file
|
| 12 |
|
|
]
|
| 13 |
|
|
.br
|
| 14 |
|
|
.B "pvalue -r"
|
| 15 |
|
|
[
|
| 16 |
|
|
.B options
|
| 17 |
|
|
]
|
| 18 |
|
|
[
|
| 19 |
|
|
.B file1
|
| 20 |
|
|
[
|
| 21 |
|
|
.B "file2 file3"
|
| 22 |
|
|
]
|
| 23 |
|
|
]
|
| 24 |
|
|
.SH DESCRIPTION
|
| 25 |
|
|
.I Pvalue
|
| 26 |
|
|
converts the pixels of a RADIANCE picture to or from another format.
|
| 27 |
|
|
In the default mode, pixels are sent to the
|
| 28 |
|
|
standard output, one per line, in the following ascii format:
|
| 29 |
|
|
|
| 30 |
|
|
xpos ypos red green blue
|
| 31 |
|
|
|
| 32 |
|
|
If no
|
| 33 |
|
|
.I file
|
| 34 |
|
|
is given, the standard input is read.
|
| 35 |
|
|
.PP
|
| 36 |
|
|
The reverse conversion option
|
| 37 |
|
|
.I (-r)
|
| 38 |
|
|
may be used with a single input file or when reading from the
|
| 39 |
|
|
standard input, but if the second form is used with three separate
|
| 40 |
|
|
input files, the three primaries are presumed to be separated in
|
| 41 |
|
|
these files.
|
| 42 |
|
|
.TP 10n
|
| 43 |
|
|
.BR \-u
|
| 44 |
|
|
Print only unique values in the output, skipping runs of equal pixels.
|
| 45 |
greg |
1.9 |
For reverse conversions, the
|
| 46 |
|
|
.I \-u
|
| 47 |
|
|
option writes uncompressed output rather than the standard run-length RGBE
|
| 48 |
|
|
encoding.
|
| 49 |
greg |
1.1 |
Specifying
|
| 50 |
|
|
.I \+u
|
| 51 |
|
|
turns this option off, which is the default.
|
| 52 |
|
|
.TP
|
| 53 |
|
|
.BR \-o
|
| 54 |
|
|
Print original values, before exposure compensation.
|
| 55 |
greg |
1.5 |
If the input file is in XYZE format, the Y (green) channel
|
| 56 |
|
|
will correspond to units of candelas/meter^2.
|
| 57 |
|
|
Otherwise, the RGB values should be in spectral watts/steradian/meter^2.
|
| 58 |
greg |
1.1 |
Specifying
|
| 59 |
|
|
.I \+o
|
| 60 |
greg |
1.5 |
uses final exposed values, which is the default.
|
| 61 |
greg |
1.1 |
.TP
|
| 62 |
|
|
.BR \-h
|
| 63 |
|
|
Do not print header.
|
| 64 |
|
|
Specifying
|
| 65 |
|
|
.I \+h
|
| 66 |
|
|
causes the header to be printed, which is the default.
|
| 67 |
|
|
.TP
|
| 68 |
|
|
.BI \-H
|
| 69 |
|
|
Do not print the resolution string.
|
| 70 |
|
|
(See also the
|
| 71 |
|
|
.I \-r
|
| 72 |
|
|
option below.)
|
| 73 |
|
|
Specifying an input resolution for reverse conversion also turns
|
| 74 |
|
|
this option off.
|
| 75 |
|
|
Specifying
|
| 76 |
|
|
.I \+H
|
| 77 |
|
|
causes the resolution string to be printed, which is the default.
|
| 78 |
|
|
.TP
|
| 79 |
|
|
.BI \-s \ nbytes
|
| 80 |
|
|
Skip the specified number of bytes on the input header.
|
| 81 |
|
|
This option is useful for skipping unintelligible headers in
|
| 82 |
|
|
foreign file formats.
|
| 83 |
|
|
.TP
|
| 84 |
|
|
.BI \-e \ exposure
|
| 85 |
|
|
Adjust the exposure by the amount specified.
|
| 86 |
|
|
If the exposure is being given as a conversion factor, use
|
| 87 |
|
|
.I \+e
|
| 88 |
|
|
instead, so an EXPOSURE line will not be recorded in the header
|
| 89 |
|
|
(if any).
|
| 90 |
|
|
.TP
|
| 91 |
|
|
.BI \-g \ gamma
|
| 92 |
|
|
Set gamma correction for conversion.
|
| 93 |
|
|
When converting from a RADIANCE picture to another format,
|
| 94 |
|
|
the inverse gamma is applied to correct for monitor response.
|
| 95 |
|
|
When converting to a RADIANCE picture
|
| 96 |
|
|
.I (\-r
|
| 97 |
|
|
option), the gamma is applied directly to recover the linear values.
|
| 98 |
|
|
By default,
|
| 99 |
|
|
.I gamma
|
| 100 |
|
|
is set to 1.0, meaning no gamma correction is performed.
|
| 101 |
|
|
.TP
|
| 102 |
|
|
.BR \-d
|
| 103 |
|
|
Data only,
|
| 104 |
|
|
do not print x and y pixel position.
|
| 105 |
|
|
.TP
|
| 106 |
|
|
.BR \-da
|
| 107 |
|
|
Same as
|
| 108 |
|
|
.I \-d.
|
| 109 |
|
|
.TP
|
| 110 |
|
|
.BR \-di
|
| 111 |
|
|
Print ascii integer values from 0 to 255+.
|
| 112 |
|
|
If
|
| 113 |
|
|
.I \+di
|
| 114 |
|
|
is given, the integer values will be preceded by
|
| 115 |
|
|
the x and y pixel locations.
|
| 116 |
|
|
.TP
|
| 117 |
|
|
.BR \-db
|
| 118 |
|
|
Output binary byte values from 0 to 255.
|
| 119 |
|
|
.TP
|
| 120 |
|
|
.BR \-dw
|
| 121 |
|
|
Output binary 16-bit words from 0 to 65535.
|
| 122 |
|
|
.TP
|
| 123 |
|
|
.BR \-dW
|
| 124 |
|
|
Output binary 16-bit words from 0 to 65535, byte-swapped.
|
| 125 |
|
|
.TP
|
| 126 |
|
|
.BR \-df
|
| 127 |
|
|
Output binary float values.
|
| 128 |
|
|
.TP
|
| 129 |
greg |
1.2 |
.BR \-dF
|
| 130 |
|
|
Output byte-swapped binary float values.
|
| 131 |
|
|
.TP
|
| 132 |
greg |
1.1 |
.BR \-dd
|
| 133 |
|
|
Output binary double values.
|
| 134 |
greg |
1.2 |
.TP
|
| 135 |
|
|
.BR \-dD
|
| 136 |
|
|
Output byte-swapped binary double values.
|
| 137 |
greg |
1.1 |
.TP
|
| 138 |
|
|
.BR \-R
|
| 139 |
|
|
Reverse ordering of colors so that the output is blue then green
|
| 140 |
|
|
then red.
|
| 141 |
|
|
The default ordering (specified with
|
| 142 |
|
|
.I \+R)
|
| 143 |
|
|
is red then green then blue.
|
| 144 |
|
|
.TP
|
| 145 |
|
|
.BR \-n
|
| 146 |
|
|
The RGB values are non-interleaved, meaning that all the red, green
|
| 147 |
|
|
and blue data are stored together in separate chunks.
|
| 148 |
|
|
Interleaving may be turned on with the
|
| 149 |
|
|
.I \+n
|
| 150 |
|
|
option, which is the default.
|
| 151 |
|
|
.TP
|
| 152 |
|
|
.BR \-b
|
| 153 |
|
|
Print brightness values rather than RGB.
|
| 154 |
|
|
Specifying
|
| 155 |
|
|
.I \+b
|
| 156 |
|
|
turns this option off, which is the default.
|
| 157 |
|
|
.TP
|
| 158 |
|
|
.BI \-p P
|
| 159 |
|
|
Put out only the primary
|
| 160 |
|
|
.I P,
|
| 161 |
|
|
where
|
| 162 |
|
|
.I P
|
| 163 |
|
|
is one of upper or lower case 'R', 'G' or 'B' for red, green or
|
| 164 |
|
|
blue, respectively.
|
| 165 |
|
|
This option may be used to separate the Radiance primaries into
|
| 166 |
|
|
three files with three separate runs of
|
| 167 |
|
|
.I pvalue,
|
| 168 |
|
|
or only one file when only one primary is needed.
|
| 169 |
|
|
Note that there is no space between this option and its argument.
|
| 170 |
|
|
.TP
|
| 171 |
|
|
.BR \-r
|
| 172 |
|
|
Perform reverse conversion.
|
| 173 |
|
|
Input is in the format given by the other options.
|
| 174 |
|
|
The x and y resolution must be specified on the command line, unless
|
| 175 |
|
|
the image file contains a Radiance resolution string at the
|
| 176 |
|
|
beginning (see
|
| 177 |
|
|
.I \-H
|
| 178 |
|
|
option above and
|
| 179 |
|
|
.I \-y
|
| 180 |
|
|
option below).
|
| 181 |
|
|
Specifying
|
| 182 |
|
|
.I \+r
|
| 183 |
|
|
converts from a Radiance picture to other values, which is the
|
| 184 |
|
|
default.
|
| 185 |
|
|
.TP
|
| 186 |
greg |
1.8 |
.BI \-p " xr yr xg yg xb yb xw yw"
|
| 187 |
|
|
On reverse conversion, RGB input uses the given set of color primaries.
|
| 188 |
|
|
These are written into the output header with the PRIMARIES variable.
|
| 189 |
|
|
.TP
|
| 190 |
|
|
.BR \-pXYZ
|
| 191 |
|
|
On reverse conversion, input is in CIE XYZ coordinates, rather than RGB.
|
| 192 |
|
|
The Y channel is assumed to be in candelas/meter^2.
|
| 193 |
|
|
.TP
|
| 194 |
greg |
1.1 |
.BI -y \ res
|
| 195 |
|
|
Set the output y resolution to
|
| 196 |
|
|
.I res.
|
| 197 |
|
|
If
|
| 198 |
|
|
.I \+y
|
| 199 |
|
|
is specified, then the scanlines are assumed to be in
|
| 200 |
|
|
increasing order (ie. bottom to top).
|
| 201 |
|
|
The default value for this option is 0, which means
|
| 202 |
|
|
that the picture size and scanline order must appear
|
| 203 |
|
|
as the first line after the header (if any) in the
|
| 204 |
|
|
input file.
|
| 205 |
|
|
Either an upper or lower case 'Y' may be used for this option.
|
| 206 |
|
|
Since Radiance files always contain such a line,
|
| 207 |
|
|
this option has no effect for forward conversions.
|
| 208 |
|
|
.TP
|
| 209 |
|
|
.BI +x \ res
|
| 210 |
|
|
Set the output x resolution to
|
| 211 |
|
|
.I res.
|
| 212 |
|
|
If
|
| 213 |
|
|
.I \-x
|
| 214 |
|
|
is specified, then the scanlines are assumed to be in
|
| 215 |
|
|
decreasing order (ie. right to left).
|
| 216 |
|
|
The ordering of the
|
| 217 |
|
|
.I \-y
|
| 218 |
|
|
and
|
| 219 |
|
|
.I \+x
|
| 220 |
|
|
options determines whether the scanlines are sorted along
|
| 221 |
|
|
x or along y.
|
| 222 |
|
|
Most Radiance pictures are sorted top to bottom, then left
|
| 223 |
|
|
to right.
|
| 224 |
greg |
1.6 |
This corresponds to a specification of the form "\-y yres +x xres".
|
| 225 |
greg |
1.1 |
Either an upper or lower case 'X' may be used for this option.
|
| 226 |
|
|
Like the
|
| 227 |
|
|
.I \-y
|
| 228 |
|
|
option,
|
| 229 |
|
|
.I \-x
|
| 230 |
|
|
options have no effect for forward conversions.
|
| 231 |
|
|
.SH EXAMPLE
|
| 232 |
|
|
To look at the original, unique pixels in picture:
|
| 233 |
|
|
.IP "" .2i
|
| 234 |
greg |
1.6 |
pvalue \-o \-u picture | more
|
| 235 |
greg |
1.1 |
.PP
|
| 236 |
|
|
To convert from a 512x400 8-bit greyscale image in bottom to top,
|
| 237 |
|
|
left to right scanline ordering:
|
| 238 |
|
|
.IP "" .2i
|
| 239 |
greg |
1.7 |
pvalue \-r \-db \-b \-h +y 400 +x 512 input.im > flipped.hdr
|
| 240 |
greg |
1.1 |
.br
|
| 241 |
greg |
1.7 |
pflip \-v flipped.hdr > final.hdr
|
| 242 |
greg |
1.1 |
.SH AUTHOR
|
| 243 |
|
|
Greg Ward
|
| 244 |
|
|
.SH BUGS
|
| 245 |
|
|
The
|
| 246 |
|
|
.I \-r
|
| 247 |
|
|
option does not work with the
|
| 248 |
|
|
.I \-u
|
| 249 |
|
|
option.
|
| 250 |
|
|
Also, input pixel locations are ignored during a reverse
|
| 251 |
|
|
conversion, so this information is not used in determining
|
| 252 |
|
|
the scanline ordering or picture size.
|
| 253 |
|
|
.SH "SEE ALSO"
|
| 254 |
|
|
getinfo(1), pcompos(1), pfilt(1), pflip(1),
|
| 255 |
greg |
1.8 |
protate(1), ra_xyze(1), rpict(1), rtrace(1), rvu(1)
|