Return absolute difference of image or constant to an image.
If a and b are two images of same size and class, returns the absolute difference between b and a.
The class of out will be the same as a unless a is logical in which case out will be double. Alternatively, the class can be specified with class.
Note 1: you can force output class to be logical by specifying class. This is incompatible with MATLAB which will not honour request to return a logical matrix.
Note 2: the values are truncated to the mininum value of the output class.
See also: imadd, imcomplement, imdivide, imlincomb, immultiply, imsubtract.
Package: image