MATLAB CVIP Toolbox Functions

CVIPtools Home

Arithmetic and Logic Functions

Functions for the application of arithmetic and logic operations to images are contained in this category. These functions require one or two images as input and they all return an image. Related functions, specifically multiplication functions that perform gray-level mapping, are in the histogram category. Included here are arithmetic functions to add, subtract, multiply, divide as well as logic functions AND, OR, XOR and NOT. The arithmetic functions will convert any image data to double precision floating point data before performing the operation, and return double precision floating point data. The logic functions will convert any input images to 8-bit or 16-bit unsigned integer data, by linear remapping if necessary, before the operation is performed. They will then perform the logic operation and return an image of type 8-bit or 16-bit unsigned integer. If the images are of different size the upper left corner will be aligned at the (1,1) location (note: this corresponds to the (0,0) location in the C programming language) and the smaller image will be zero padded before the operation is performed. If the images have a different number of bands, the single band image will have that band repeated to perform the operation.