| Contents | Index |
Z = imdivide(X,Y)
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.
Note On Intel architecture processors, imdivide can take advantage of the Intel Integrated Performance Primitives (Intel IPP) library, thus accelerating its execution time. The Intel IPP library is activated only if arrays X and Y are of class uint8, int16, or single and are of the same size and class. |
Divide two uint8 arrays. Note that fractional values greater than or equal to 0.5 are rounded up to the nearest integer.
X = uint8([ 255 10 75; 44 225 100]);
Y = uint8([ 50 20 50; 50 50 50 ]);
Z = imdivide(X,Y)
Z =
5 1 2
1 5 2Estimate and divide out the background of the rice image.
I = imread('rice.png');
background = imopen(I,strel('disk',15));
Ip = imdivide(I,background);
imshow(Ip,[])Divide an image by a constant factor.
I = imread('rice.png');
J = imdivide(I,2);
subplot(1,2,1), imshow(I)
subplot(1,2,2), imshow(J)imabsdiff | imadd | imcomplement | imlincomb | immultiply | imsubtract | ippl

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |