<< imabsdiff SIVP - Scilab Image and Video Processing Toolbox imcomplement >>

SIVP - Scilab Image and Video Processing Toolbox >> SIVP - Scilab Image and Video Processing Toolbox > imadd

imadd

Add two images or add a constant to an image

Calling Sequence

imout = imadd(im1, im2)

Parameters

im1
Input image.
im2
Input image with the same size and same class with im1, or a double scalar.
imout
The sum of im1 and im2.

Description

If im1 and im2 are images with the same size and same class, imadd adds each element in im1 to the corresponding one in im2. If im2 is a double scalar, the element in imout is the sum of the corresponding one in im1 with the double scalar. imout has the same size and class with im1.

If im1 is an integer matrix, the elements in the output matrix imout that exceed the range of the integer type will be truncated.

Supported classes: INT8, UINT8, INT16, UINT16, INT32, DOUBLE.

Examples

im1 = imread('lena.png');
im2 = imread('peppers.png');
ims1 = imadd(im1, im2);
ims2 = imadd(im1, 50);

Authors

Availability

The latest version of SIVP can be found at

http://sivp.sf.net

See Also

<< imabsdiff SIVP - Scilab Image and Video Processing Toolbox imcomplement >>