Combine images linearly.
Returns the computed image as per:
out = fac1*img1 + fac2*img2 + … + facn*imgn
or
out = fac1*img1 + fac2*img2 + … + facn*imgn + K
The images img1..n must all be of same size and class. The factors fac1..n must all be floating-point scalars, and K (if given) is a real constant.
The class of out will be the same as imgs unless imgs are logical in which case out will be double. Alternatively, it can be specified with class.
If applying several arithmetic operations on images, imlincomb
is more
precise since calculations are performed at double precision.
Note 1: you can force output class to be logical by specifying class though it possibly doesn’t make a lot of sense.
See also: imadd, imcomplement, imdivide, immultiply, imsubtract.
Package: image