: Y = imapplymatrix (M, X)
: Y = imapplymatrix (M, X, C)
: Y = imapplymatrix (…, output_type)

Linear combination of color channels.

Computes a linear combination of channels of image X given a matrix of coefficients M and optionally adding a constant value to each output channel. X is an image of size [m, n, p, …], M is a multiplication matrix of size [q, p] and C is a vector of constants of length q. Y is a matrix of size [m, n, q, …] with q output channels. q is in the range [1, p].

Y is of the same type as X, unless output_type is specified.

Package: image