| 1 |
|
.\" RCSid "$Id$" |
| 2 |
< |
.TH RMTXOP 1 7/8/97 RADIANCE |
| 2 |
> |
.TH RMTXOP 1 5/31/2014 RADIANCE |
| 3 |
|
.SH NAME |
| 4 |
|
rmtxop - concatenate, add, multiply, divide, transpose, scale, and convert matrices |
| 5 |
|
.SH SYNOPSIS |
| 9 |
|
][ |
| 10 |
|
.B \-f[afdc] |
| 11 |
|
][ |
| 12 |
< |
.B \-t |
| 12 |
> |
.B "\-C {symbols|file}" |
| 13 |
|
][ |
| 14 |
+ |
.B "\-c ce .." |
| 15 |
+ |
][ |
| 16 |
|
.B "\-s sf .." |
| 17 |
|
][ |
| 18 |
< |
.B "\-c ce .." |
| 18 |
> |
.B \-t |
| 19 |
|
][ |
| 20 |
< |
.B -r[fb] |
| 20 |
> |
.B "\-rf|\-rb" |
| 21 |
|
] |
| 22 |
|
.B m1 |
| 23 |
|
[ |
| 34 |
|
NROWS={number of rows} |
| 35 |
|
NCOLS={number of columns} |
| 36 |
|
NCOMP={number of components} |
| 37 |
< |
FORMAT={ascii|float|double|32-bit_rle_rgbe|32-bit_rle_xyze} |
| 36 |
< |
.sp |
| 37 |
> |
FORMAT={ascii|float|double|32-bit_rle_rgbe|32-bit_rle_xyze|Radiance_spectra} |
| 38 |
|
.fi |
| 39 |
+ |
.sp |
| 40 |
|
The number of components indicates that each matrix element is actually |
| 41 |
|
composed of multiple elements, most commonly an RGB triple. |
| 42 |
|
This is essentially dividing the matrix into planes, where each component |
| 65 |
|
the number of rows match the Y-dimension. |
| 66 |
|
The picture must be in standard pixel ordering, and the first row |
| 67 |
|
is at the top with the first column on the left. |
| 68 |
< |
Any exposure changes applied to the pictures beforehand |
| 68 |
> |
Any exposure changes that were applied to the pictures before |
| 69 |
|
.I rmtxop |
| 70 |
|
will be undone, similar to the |
| 71 |
|
.I pcomb(1) |
| 72 |
|
.I \-o |
| 73 |
|
option. |
| 74 |
+ |
Radiance spectral pictures with more than 3 components are also supported. |
| 75 |
+ |
These are typically produced by |
| 76 |
+ |
.I rtrace(1) |
| 77 |
+ |
or |
| 78 |
+ |
.I rfluxmtx(1). |
| 79 |
|
.PP |
| 80 |
|
Before each file, the |
| 81 |
|
.I \-t |
| 82 |
|
and |
| 76 |
– |
.I \-s |
| 77 |
– |
or |
| 83 |
|
.I \-c |
| 84 |
+ |
and/or |
| 85 |
+ |
.I \-s |
| 86 |
|
options may be used to modify the matrix. |
| 87 |
|
The |
| 88 |
|
.I \-t |
| 89 |
|
option transposes the matrix, swapping rows and columns. |
| 90 |
|
The |
| 84 |
– |
.I \-s |
| 85 |
– |
option applies the given scalar factor(s) to the elements of the matrix. |
| 86 |
– |
If only one factor is provided, |
| 87 |
– |
it will be used for all components. |
| 88 |
– |
If multiple factors are given, their number must match the number of matrix |
| 89 |
– |
components. |
| 90 |
– |
Alternatively, the |
| 91 |
|
.I \-c |
| 92 |
< |
option may be used to "transform" the element values, possibly changing |
| 92 |
> |
option can "transform" the element values, possibly changing |
| 93 |
|
the number of components in the matrix. |
| 94 |
|
For example, a 3-component matrix can be transformed into a single-component |
| 95 |
|
matrix by using |
| 101 |
|
yield the second new component. |
| 102 |
|
Note that the number of coefficients must be an even multiple of the number |
| 103 |
|
of original components. |
| 104 |
+ |
.PP |
| 105 |
+ |
Alternatively, a set of symbolic output components may be given to the |
| 106 |
+ |
.I \-c |
| 107 |
+ |
option, with the following definitions: |
| 108 |
+ |
.sp |
| 109 |
+ |
.nf |
| 110 |
+ |
R - red channel |
| 111 |
+ |
G - green channel |
| 112 |
+ |
B - blue channel |
| 113 |
+ |
X - CIE X channel |
| 114 |
+ |
Y - CIE Y channel (aka., luminance or illuminance) |
| 115 |
+ |
Z - CIE Z channel |
| 116 |
+ |
S - scotopic luminance or illuminance |
| 117 |
+ |
M - melanopic luminance or illuminance |
| 118 |
+ |
A - average component value |
| 119 |
+ |
.fi |
| 120 |
+ |
.sp |
| 121 |
+ |
These letters may be given in any order as a single string, and if |
| 122 |
+ |
.I "-c RGB" |
| 123 |
+ |
or |
| 124 |
+ |
.I "-c XYZ" |
| 125 |
+ |
is specified with |
| 126 |
+ |
.I "-fc" |
| 127 |
+ |
option, the output will be written as a RGBE or XYZE picture, respectively. |
| 128 |
+ |
Note that conversion from a float or RGBE color space applies a conversion |
| 129 |
+ |
of 179 lumens/watt (for CIE or melanopic output) or 412 (for scotopic output), |
| 130 |
+ |
and the reverse happens for conversion from XYZE input to RGB or RGBE output. |
| 131 |
+ |
.PP |
| 132 |
+ |
If a matrix or picture file is given to the |
| 133 |
+ |
.I \-c |
| 134 |
+ |
option, then the color space of that file will be used, instead. |
| 135 |
+ |
.PP |
| 136 |
|
The |
| 137 |
+ |
.I \-C |
| 138 |
+ |
option takes either a symbolic color space or an input file, and will be |
| 139 |
+ |
applied to all subsequent matrices that do not have their own associated |
| 140 |
+ |
.I \-c |
| 141 |
+ |
option. |
| 142 |
+ |
.PP |
| 143 |
+ |
Additionally, the |
| 144 |
|
.I \-s |
| 145 |
< |
and |
| 145 |
> |
option applies the given scalar factor(s) to the elements of the matrix. |
| 146 |
> |
If only one factor is provided, |
| 147 |
> |
it will be used for all components. |
| 148 |
> |
If multiple factors are given, their number must match the number of matrix |
| 149 |
> |
components |
| 150 |
> |
.I after |
| 151 |
> |
application of any |
| 152 |
|
.I \-c |
| 153 |
< |
options are mutually exclusive, insofar as they cannot be applied together |
| 109 |
< |
to the same input matrix. |
| 153 |
> |
option for this input matrix or picture. |
| 154 |
|
.PP |
| 155 |
|
If present, the second and subsequent matrices on the command |
| 156 |
|
line are concatenated together, unless separated by a plus ('+'), |
| 189 |
|
the number of rows and columns of the prior result and the |
| 190 |
|
next matrix must match, and will not be changed by the operation. |
| 191 |
|
.PP |
| 192 |
< |
A final transpose or scaling/transform operation may be applied to |
| 192 |
> |
A final transpose or transform/scaling operation may be applied to |
| 193 |
|
the results by appending the |
| 194 |
|
.I \-t |
| 195 |
|
and |
| 152 |
– |
.I \-s |
| 153 |
– |
or |
| 196 |
|
.I \-c |
| 197 |
+ |
and/or |
| 198 |
+ |
.I \-s |
| 199 |
|
options after the last matrix on the command line. |
| 200 |
|
.PP |
| 201 |
|
Results are sent to the standard output. |
| 203 |
|
among the inputs, but the |
| 204 |
|
.I \-f |
| 205 |
|
option may be used to explicitly output components |
| 206 |
< |
as ASCII (-fa), binary doubles (-fd), floats (-ff), or RGBE colors (-fc). |
| 206 |
> |
as ASCII (-fa), binary doubles (-fd), floats (-ff), or common-exponent |
| 207 |
> |
colors/spectra (-fc). |
| 208 |
|
In the latter case, the actual matrix dimensions are written in the resolution |
| 209 |
|
string rather than the header. |
| 210 |
< |
Also, matrix results written as Radiance pictures must have either one |
| 210 |
> |
Also, matrix results will be written as standard |
| 211 |
> |
Radiance pictures if they have either one |
| 212 |
|
or three components. |
| 213 |
|
In the one-component case, the output is written as grayscale. |
| 214 |
+ |
If more than 3 components are in the final matrix and |
| 215 |
+ |
.I -fc |
| 216 |
+ |
is specified, the output will be a Radiance spectral picture. |
| 217 |
|
.PP |
| 218 |
|
The |
| 219 |
|
.I \-v |
| 232 |
|
.IP "" .2i |
| 233 |
|
rmtxop -fa -c .265 .670 .065 image.hdr > image_lum.mtx |
| 234 |
|
.PP |
| 235 |
+ |
To render a melanopic illuminance image with |
| 236 |
+ |
.I rtrace\: |
| 237 |
+ |
.IP "" .2i |
| 238 |
+ |
vwrays -ff -x 1024 -y 1024 -vf myview.vf | |
| 239 |
+ |
rtrace -fff -cs 18 -co+ -i+ `vwrays -x 1024 -y 1024 -vf myview.vf -d` scene.oct | |
| 240 |
+ |
rmtxop -fc -c M - > scene_meli.hdr |
| 241 |
+ |
.PP |
| 242 |
|
To scale a matrix by 4 and add it to the transpose of another matrix: |
| 243 |
|
.IP "" .2i |
| 244 |
|
rmtxop -s 4 first.mtx + -t second.mtx > result.mtx |
| 272 |
|
.SH AUTHOR |
| 273 |
|
Greg Ward |
| 274 |
|
.SH "SEE ALSO" |
| 275 |
< |
cnt(1), getinfo(1), histo(1), neaten(1), pcomb(1), rcalc(1), |
| 276 |
< |
rcollate(1), rcontrib(1), rfluxmtx(1), rlam(1), |
| 277 |
< |
rsplit(1), tabfunc(1), total(1), wrapBSDF(1) |
| 275 |
> |
cnt(1), getinfo(1), histo(1), neaten(1), pcomb(1), |
| 276 |
> |
ra_xyze(1), rcalc(1), |
| 277 |
> |
rcollate(1), rcontrib(1), rcrop(1), rfluxmtx(1), rlam(1), |
| 278 |
> |
rsplit(1), rtrace(1), tabfunc(1), total(1), vwrays(1), |
| 279 |
> |
wrapBSDF(1) |