Image Processing Toolbox    
imdivide

Divide one image into another, or divide an image by a constant

Syntax

Description

Z = imdivide(X,Y) divides each element in the array X by the corresponding element in array Y and returns the result in the corresponding element of the output array Z. X and Y are real, nonsparse numeric arrays with the same size and class, or Y can be a scalar double. Z has the same size and class as X and Y.

If X is an integer array, elements in the output that exceed the range of integer type are truncated, and fractional values are rounded.

If X and Y are double arrays, you can use the expression X./Y instead of this function.

Example

Divide two uint8 arrays. Note that fractional values greater than or equal to 0.5 are rounded up to the nearest integer.

Estimate and divide out the background of the rice image.

Divide an image by a constant factor.

See Also

imabsdiff, imadd, imcomplement, imlincomb, immultiply, imsubtract


  imdilate imerode