cv.divide - MATLAB File Help |
Performs per-element division of two arrays or a scalar by an array
dst = cv.divide(src1, src2)
dst = cv.divide(src1, src2, 'OptionName',optionValue, ...)
src1
.src2
.dst
will have depth
class(src2)
, but in case of an array-by-array division, you can only
pass -1 when class(src1)==class(src2)
. default -1The function cv.divide divides one array by another:
dst(I) = saturate(src1(I)*scale / src2(I))
When src2(I)
is zero, dst(I)
will also be zero. Different channels of
multi-channel arrays are processed independently.
Note: Saturation is not applied when the output array has the depth int32
.
You may even get result of an incorrect sign in the case of overflow.