| 1 |
< |
.\" RCSid "$Id" |
| 1 |
> |
.\" RCSid "$Id$" |
| 2 |
|
.TH PCOMB 1 8/31/96 RADIANCE |
| 3 |
|
.SH NAME |
| 4 |
< |
pcomb - combine RADIANCE pictures. |
| 4 |
> |
pcomb - combine RADIANCE pictures and/or float matrices |
| 5 |
|
.SH SYNOPSIS |
| 6 |
|
.B pcomb |
| 7 |
|
[ |
| 8 |
+ |
.B -h |
| 9 |
+ |
][ |
| 10 |
|
.B -w |
| 11 |
|
][ |
| 12 |
+ |
.B -ff |
| 13 |
+ |
][ |
| 14 |
|
.B "\-x xres" |
| 15 |
|
][ |
| 16 |
|
.B "\-y yres" |
| 31 |
|
] |
| 32 |
|
.SH DESCRIPTION |
| 33 |
|
.I Pcomb |
| 34 |
< |
combines equal-sized RADIANCE pictures and sends the result to the |
| 35 |
< |
standard output. |
| 34 |
> |
combines equal-sized RADIANCE pictures or raw float matrices |
| 35 |
> |
and sends the result to the standard output. |
| 36 |
|
By default, the result is just a linear combination of |
| 37 |
< |
the input pictures multiplied by |
| 37 |
> |
the input pixels multiplied by |
| 38 |
|
.I \-s |
| 39 |
|
and |
| 40 |
|
.I \-c |
| 43 |
|
.I \-e |
| 44 |
|
and |
| 45 |
|
.I \-f |
| 46 |
< |
options. |
| 46 |
> |
options, similar to |
| 47 |
> |
.I rcalc(1). |
| 48 |
> |
(The variable and function definitions in each |
| 49 |
> |
.I \-f source |
| 50 |
> |
file are read and compiled from the RADIANCE library |
| 51 |
> |
where it is found.)\0 |
| 52 |
|
Negative coefficients and functions are allowed, and |
| 53 |
|
.I pcomb |
| 54 |
< |
will produce color values of zero where they would be negative. |
| 54 |
> |
will produce color values of zero where they would be negative |
| 55 |
> |
unless the |
| 56 |
> |
.I \-ff |
| 57 |
> |
option is used to specify floating-point matrix output. |
| 58 |
|
.PP |
| 59 |
|
The variables |
| 60 |
|
.I ro, |
| 70 |
|
.I gi(n) |
| 71 |
|
and |
| 72 |
|
.I bi(n) |
| 73 |
< |
give the red, green and blue input values for |
| 74 |
< |
picture |
| 73 |
> |
give the red, green and blue values for |
| 74 |
> |
input |
| 75 |
|
.I n. |
| 76 |
|
To access a pixel that is nearby the current one, these functions |
| 77 |
|
also accept optional x and y offsets. |
| 78 |
|
For example, |
| 79 |
|
.I ri(3,-2,1) |
| 80 |
< |
would return the red component of the pixel from picture 3 |
| 80 |
> |
would return the red component of the pixel from input 3 |
| 81 |
|
that is left 2 and up 1 from the current position. |
| 82 |
< |
Although x offsets may be as large as width of the picture, |
| 83 |
< |
y offsets are limited to a small window (+/- 8 pixels) due to efficiency |
| 82 |
> |
Although x offsets may be as large as width of the input, |
| 83 |
> |
y offsets are limited to a small window (+/- 32 pixels) due to efficiency |
| 84 |
|
considerations. |
| 85 |
|
However, it is not usually necessary to worry about this problem -- |
| 86 |
|
if the requested offset is not available, the next best pixel is |
| 88 |
|
.PP |
| 89 |
|
For additional convenience, the function |
| 90 |
|
.I li(n) |
| 91 |
< |
is defined as the input brightness for picture |
| 91 |
> |
is defined as the input brightness for input |
| 92 |
|
.I n. |
| 93 |
|
This function also accepts x and y offsets. |
| 94 |
|
.PP |
| 97 |
|
gives the number of input files present, |
| 98 |
|
and |
| 99 |
|
.I WE |
| 100 |
< |
gives the white efficacy (lumens/brightness) for pixel values. |
| 100 |
> |
gives the white efficacy (lumens/brightness) for pixel values, |
| 101 |
> |
which may be used with the |
| 102 |
> |
.I \-o |
| 103 |
> |
option or the le(n) values to convert to absolute |
| 104 |
> |
photometric units (see below). |
| 105 |
|
The variables |
| 106 |
|
.I x |
| 107 |
|
and |
| 120 |
|
.I "re(n), ge(n), be(n)," |
| 121 |
|
and |
| 122 |
|
.I le(n) |
| 123 |
< |
give the exposure values for picture |
| 123 |
> |
give the exposure values for input |
| 124 |
|
.I n, |
| 125 |
|
and |
| 126 |
|
.I pa(n) |
| 127 |
|
gives the corresponding pixel aspect ratio. |
| 128 |
< |
Finally, for pictures with stored view parameters, |
| 128 |
> |
Exposure values will be set to 1.0 for inputs with the |
| 129 |
> |
.I \-o |
| 130 |
> |
option set. |
| 131 |
> |
Finally, for inputs with stored view parameters, |
| 132 |
|
the functions |
| 133 |
|
.I "Ox(n), Oy(n)" |
| 134 |
|
and |
| 135 |
|
.I Oz(n) |
| 136 |
|
return the ray origin in world coordinates for the current pixel |
| 137 |
< |
in picture |
| 137 |
> |
in input |
| 138 |
|
.I n, |
| 139 |
|
and |
| 140 |
|
.I "Dx(n), Dy(n)" |
| 153 |
|
will return a negative value, and |
| 154 |
|
.I S(n) |
| 155 |
|
will return zero. |
| 156 |
+ |
The first input input with a view is assumed to correspond to the |
| 157 |
+ |
view of the output, which is written into the header. |
| 158 |
|
.PP |
| 159 |
|
The |
| 160 |
+ |
.I \-h |
| 161 |
+ |
option may be used to reduce the information header size, which |
| 162 |
+ |
can grow disproportionately after multiple runs of |
| 163 |
+ |
.I pcomb |
| 164 |
+ |
and/or |
| 165 |
+ |
.I pcompos(1). |
| 166 |
+ |
The |
| 167 |
|
.I \-w |
| 168 |
|
option can be used to suppress warning messages about invalid |
| 169 |
|
calculations. |
| 170 |
|
The |
| 171 |
|
.I \-o |
| 172 |
|
option indicates that original pixel values are to be used for the next |
| 173 |
< |
picture, undoing any previous exposure changes or color correction. |
| 173 |
> |
input, undoing any previous exposure changes or color correction. |
| 174 |
|
.PP |
| 175 |
|
The |
| 176 |
|
.I \-x |
| 202 |
|
and |
| 203 |
|
.I bo |
| 204 |
|
will be used to compute each output pixel. |
| 205 |
< |
This is useful for producing simple test pictures for various |
| 205 |
> |
This is useful for producing simple test inputs for various |
| 206 |
|
purposes. |
| 207 |
|
(Theoretically, one could write a complete renderer using just the |
| 208 |
|
functional language...) |
| 209 |
|
.PP |
| 210 |
|
The standard input can be specified with a hyphen ('-'). |
| 211 |
< |
A command that produces a RADIANCE picture can be given in place of a file |
| 211 |
> |
A command that produces a RADIANCE picture or float matrix |
| 212 |
> |
can be given in place of a file |
| 213 |
|
by preceeding it with an exclamation point ('!'). |
| 214 |
|
.SH EXAMPLES |
| 215 |
|
To produce a picture showing the difference between pic1 and pic2: |
| 216 |
|
.IP "" .2i |
| 217 |
< |
pcomb -e 'ro=ri(1)-ri(2);go=gi(1)-gi(2);bo=bi(1)-bi(2)' pic1 pic2 > diff |
| 217 |
> |
pcomb \-e 'ro=ri(1)\-ri(2);go=gi(1)\-gi(2);bo=bi(1)\-bi(2)' pic1 pic2 > diff |
| 218 |
|
.PP |
| 219 |
|
Or, more efficiently: |
| 220 |
|
.IP "" .2i |
| 221 |
< |
pcomb pic1 -s -1 pic2 > diff |
| 221 |
> |
pcomb pic1 \-s \-1 pic2 > diff |
| 222 |
|
.PP |
| 223 |
|
To precompute the gamma correction for a picture: |
| 224 |
|
.IP "" .2i |
| 225 |
< |
pcomb -e 'ro=ri(1)^.4;go=gi(1)^.4;bo=bi(1)^.4' pic > pic.gam |
| 225 |
> |
pcomb \-e 'ro=ri(1)^.4;go=gi(1)^.4;bo=bi(1)^.4' inp.hdr > gam.hdr |
| 226 |
|
.PP |
| 227 |
|
To perform some special filtering: |
| 228 |
|
.IP "" .2i |
| 229 |
< |
pcomb -f myfilt.cal -x xmax/2 -y ymax/2 input.pic > filtered.pic |
| 229 |
> |
pcomb \-f myfilt.cal \-x xmax/2 \-y ymax/2 input.hdr > filtered.hdr |
| 230 |
|
.PP |
| 231 |
|
To make a picture of a dot: |
| 232 |
|
.IP "" .2i |
| 233 |
< |
pcomb -x 100 -y 100 -e 'ro=b;go=b;bo=b;b=if((x-50)^2+(y-50)^2-25^2,0,1)' > dot |
| 233 |
> |
pcomb \-x 100 \-y 100 \-e 'ro=b;go=b;bo=b;b=if((x-50)^2+(y-50)^2\-25^2,0,1)' > dot |
| 234 |
> |
.SH ENVIRONMENT |
| 235 |
> |
RAYPATH the directories to check for auxiliary files. |
| 236 |
|
.SH AUTHOR |
| 237 |
|
Greg Ward |
| 238 |
|
.SH "SEE ALSO" |
| 239 |
< |
calc(1), getinfo(1), pcompos(1), pfilt(1), rpict(1) |
| 239 |
> |
getinfo(1), icalc(1), pcompos(1), pfilt(1), rcalc(1), |
| 240 |
> |
rmtxcomb(1), rmtxop(1), rpict(1) |