You are here : matlabImage Processingimlincomb

imlincomb() - Image Processing

Z = imlincomb(K1,A1,K2,A2,...,Kn,An) computesK1*A1 + K2*A2 + ... + Kn*Anwhere K1, K2, through Kn are
real, double scalars and A1, A2,
through An are real, nonsparse, numeric arrays
with the same class and size. Z has the same class
and size as A1 unless A1 is
logical, in which case Z is double.Z = imlincomb(K1,A1,K2,A2,...,Kn,An,K) computesK1*A1 + K2*A2 + ... + Kn*An + Kwhere imlincomb adds K,
a real, double scalar, to the sum of the products of K1 through Kn and A1 through An. Z = imlincomb(___,output_class) lets
you specify the class of Z. output_class is
a string containing the name of a numeric class.gpuarrayZ = imlincomb(gpuarrayK,gpuarrayA,___,output_class) performs
the operation on a GPU, where the input values,gpuarrayK and gpuarrayA,
are gpuArrays and the output value, gpuarrayZ is
a gpuArray. This syntax requires the Parallel Computing Toolbox™When performing a series of arithmetic operations on a pair
of images, you can achieve more accurate results if you use imlincomb to
combine the operations, rather than nesting calls to the individual
arithmetic functions, such as imadd. When you nest
calls to the arithmetic functions, and the input arrays are of an
integer class, each function truncates and rounds the result before
passing it to the next function, thus losing accuracy in the final
result. imlincomb computes each element of the
output Z individually, in double-precision floating
point. If Z is an integer array, imlincomb truncates
elements of Z that exceed the range of the integer
type and rounds off fractional values.Code Generation support:
Yes.MATLAB Function Block support:


Z = imlincomb(K1,A1,K2,A2,...,Kn,An)Z = imlincomb(K1,A1,K2,A2,...,Kn,An,K)Z = imlincomb(___,output_class)gpuarrayZ = imlincomb(gpuarrayK,gpuarrayA,___,output_class)


K1*A1 + K2*A2 + ... + Kn*An

Output / Return Value


Alternatives / See Also