11 |
|
][ |
12 |
|
.B \-f[afdc] |
13 |
|
][ |
14 |
+ |
.B "\-n nproc" |
15 |
+ |
][ |
16 |
|
.B "\-f file" |
17 |
|
][ |
18 |
|
.B "\-e expr" |
55 |
|
.I \-s |
56 |
|
options follow the last input matrix, output results will be transformed |
57 |
|
and/or scaled accordingly. |
58 |
< |
These operations are discussed in greater detail further on. |
58 |
> |
These operations are discussed in greater detail below. |
59 |
|
A single concatenation matrix may be applied after element operations |
60 |
|
using the |
61 |
|
.I \-m |
73 |
|
.fi |
74 |
|
.sp |
75 |
|
The number of components indicates that each matrix element is actually |
76 |
< |
composed of multiple elements, most commonly an RGB triple. |
76 |
> |
composed of multiple channels, most commonly an RGB triple. |
77 |
|
This is essentially dividing the matrix into planes, where each component |
78 |
|
participates in a separate calculation. |
79 |
|
If an appropriate header is not present, it may be added with a call to |
143 |
|
is specified for an input picture or the |
144 |
|
.I "-fc" |
145 |
|
option is given, the output will be written as a RGBE or XYZE picture. |
146 |
< |
Note that conversion from a float or RGBE color space applies a conversion |
146 |
> |
Note that conversion from a float or RGBE color space applies an efficacy factor |
147 |
|
of 179 lumens/watt (for CIE or melanopic output) or 412 (for scotopic output), |
148 |
< |
and the reverse happens for conversion from XYZE input to RGB or RGBE output. |
148 |
> |
and the inverse happens for conversion from XYZE input to RGB or RGBE output. |
149 |
|
Lower case versions of all these components are also supported, the only |
150 |
< |
difference is that the aforementioned efficacy factors |
149 |
< |
will be left out of the conversion. |
150 |
> |
difference being that the efficacy factors are ignored. |
151 |
|
.PP |
152 |
|
If a matrix or picture file path is given to the |
153 |
|
.I \-c |
189 |
|
or |
190 |
|
.I \-f |
191 |
|
options are used to define a "co" variable or "co(p)" function, |
192 |
< |
this will be evaluated at each output |
193 |
< |
component for the current element. |
192 |
> |
which will be evaluated for each output |
193 |
> |
component from the current element. |
194 |
|
The "co" variable defines identical operations for all components, |
195 |
|
whereas "co(p)" may specify different operations for each component. |
196 |
|
The element position is defined |
251 |
|
.I \-w |
252 |
|
option turns off warnings about divide-by-zero and other non-fatal |
253 |
|
calculation errors. |
254 |
+ |
.PP |
255 |
+ |
The |
256 |
+ |
.I \-n |
257 |
+ |
option specifies how many execution processes to employ, |
258 |
+ |
which may improve performance on multi-core architectures, |
259 |
+ |
especially for matrix multiplication |
260 |
+ |
and complex operations on long input rows. |
261 |
|
.SH EXAMPLES |
262 |
< |
To convert two hyperspectral inputs to RGB color space, |
262 |
> |
To convert two hyperspectral pictures to RGB color space, |
263 |
|
average them together, and write them out as a RADIANCE picture: |
264 |
|
.IP "" .2i |
265 |
< |
rcomb -C RGB -s .5 img1.spc -s .5 img2.spc > avg.hdr |
265 |
> |
rcomb -C RGB -s .5 img1.hsr -s .5 -fc img2.hsr > avg.hdr |
266 |
|
.PP |
267 |
|
Divide one set of matrix elements by the Euclidean sum of two others: |
268 |
|
.IP "" .2i |
272 |
|
Compute the absolute and relative differences between melanopic and photopic values |
273 |
|
in a spectral image: |
274 |
|
.IP "" .2i |
275 |
< |
rcomb -fa -C MY -e "abs(x):if(x,x,-x)" |
275 |
> |
rcomb -C MY -e "abs(x):if(x,x,-x)" |
276 |
|
-e "co(p)=select(p,abs(ci(1,1)-ci(1,2)),(ci(1,1)-ci(1,2))/ci(1,2))" |
277 |
< |
input_spec.hsr > compare.mtx |
277 |
> |
input_spec.hsr -fa > compare.mtx |
278 |
|
.PP |
279 |
|
Concatenate a spectral flux coefficient matrix with a spectral sky |
280 |
|
matrix to compute a set of melanopic lux values: |
289 |
|
.I pcomb, |
290 |
|
whose capabilities somewhat overlap. |
291 |
|
The former loads each matrix into memory before operations, |
292 |
< |
and element components take 8 bytes apiece, adding up quickly. |
292 |
> |
and element components are stored as double-precision. |
293 |
|
Very large matrices therefore present a problem with that tool. |
294 |
|
Furthermore, |
295 |
|
.I rmtxop |
322 |
|
.I rcomb |
323 |
|
should be preferred over |
324 |
|
.I rmtxop |
325 |
< |
for any operations in can handle, which is everything except |
325 |
> |
for any operations it can handle, which is everything except |
326 |
|
multiple matrix concatenations and transpose |
327 |
< |
operations, which are handled more efficiently by |
328 |
< |
.I rcollate(1) |
329 |
< |
in any case. |
327 |
> |
operations. |
328 |
> |
The latter may be handled more efficiently by |
329 |
> |
.I rcollate(1). |
330 |
|
That said, there is no significant difference for |
331 |
< |
simple operations on smallish matrices, and note that only |
331 |
> |
simple operations on small matrices, and only |
332 |
|
.I rmtxop |
333 |
|
and |
334 |
|
.I dctimestep(1) |
335 |
< |
currently accept XML files as inputs. |
336 |
< |
Also, the resizing function of |
335 |
> |
accept XML files as inputs. |
336 |
> |
Also note that the resizing function of |
337 |
|
.I pcomb |
338 |
|
is not supported in |
339 |
|
.I rcomb, |
340 |
|
and should instead be handled by |
341 |
|
.I pfilt(1). |
342 |
+ |
.PP |
343 |
+ |
Similar to |
344 |
+ |
.I rmtxop, |
345 |
+ |
all calculations are peformed internally using 32-bit floating-point, |
346 |
+ |
so there is little benefit in either reading or writing 64-bit double |
347 |
+ |
data. |
348 |
+ |
This may be overridden at compile time using the macro |
349 |
+ |
"-DDTrmx_native=DTdouble". |
350 |
|
.SH BUGS |
351 |
|
The |
352 |
|
.I rcomb |
357 |
|
Greg Ward |
358 |
|
.SH "SEE ALSO" |
359 |
|
dctimestep(1), icalc(1), getinfo(1), pcomb(1), pfilt(1), |
360 |
< |
ra_xyze(1), rcalc(1), |
360 |
> |
pvsum(1), ra_rgbe(1), ra_xyze(1), rcalc(1), |
361 |
|
rcollate(1), rcontrib(1), rcrop(1), rfluxmtx(1), |
362 |
|
rmtxop(1), rtpict(1), rtrace(1), vwrays(1) |