Image arithmetic is the implementation of standard arithmetic operations, such as addition, subtraction, multiplication, and division, on images. Image arithmetic has many uses in image processing both as a preliminary step in more complex operations and by itself. For example, image subtraction can be used to detect differences between two or more images of the same scene or object.
You can do image arithmetic using the MATLAB® arithmetic operators. The Image Processing
Toolbox™ software also includes a set of functions that implement arithmetic
operations for all numeric, nonsparse data types. The toolbox arithmetic functions
accept any numeric data type, including
double, and return the result
image in the same format. The functions perform the operations in double precision, on
an element-by-element basis, but do not convert images to double-precision values in the
MATLAB workspace. Overflow is handled automatically. The functions clip return
values to fit the data type.
On Intel® architecture processors, the image arithmetic functions can take advantage of the Intel Integrated Performance Primitives (Intel IPP) library, thus accelerating their execution time. The Intel IPP library is only activated, however, when the data passed to these functions is of specific data types. See the reference pages for the individual arithmetic functions for more information.