This operation is represented schematically as:
[ ] [ ] [ ]
[ ] [ ] [ ]
[ ] [ ] -> [ ]
[ ] [ ] [ ]
[ ] [ ] E x1
W x H E x1 o
m m i
^ ^ ^
| | |
| | +--- output vector, E =H
| | o m
| +--- input vector
|
+--- input matrix
The output data type is controlled by the -type argument.
If -type is 0 ("Propagate input type") then output data type will be the same
as the input data type (look out for wraparound). If a different data type is
specified, the output data is cast to that type after the transformation is
computed.
The following will scale the first band of a 3-band image by 1.0, the second band by 2.0, and the third band by 3.0:% cat > matrix <<EOF 1 0 0 0 2 0 0 0 3 EOF
% mtransform -i1 matrix -i2 3-band-image -o output