<< imcomplement Image Arithmetic imlincomb >>

IPCV >> Image Arithmetic > imdivide

imdivide

Divide two images or divide an image by an constant.

Syntax

imout = imdivide(im1, im2)

Parameters

im1 :

Input image.

im2 :

Input image with the same size and same class with im1 , or a double scalar.

imout :

The result of dividing im1 by im2 .

Description

If im1 and im2 are images with the same size and same class, imdivide divides each element in im1 by the corresponding one in im2.

If im2 is a double scalar, the element in imout is the result of dividing the corresponding one in im1 by 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(fullpath(getIPCVpath() + "/images/baboon.png"));
im2 = imread(fullpath(getIPCVpath() + "/images/peppers.png"));
ims1 = imdivide(im1, im2);
ims2 = imdivide(im1, 0.6);

See also

Authors


Report an issue
<< imcomplement Image Arithmetic imlincomb >>