[−][src]Function opencv::core::divide
pub fn divide(scale: f64, src2: &Mat, dst: &mut Mat, dtype: i32) -> Result<()>
Performs per-element division of two arrays or a scalar by an array.
The function cv::divide divides one array by another:
\texttt{dst(I) = saturate(src1(I)*scale/src2(I))}
or a scalar by an array when there is no src1 :
\texttt{dst(I) = saturate(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 CV_32S. You may even get result of an incorrect sign in the case of overflow.
Parameters
- src1: first input array.
- src2: second input array of the same size and type as src1.
- scale: scalar factor.
- dst: output array of the same size and type as src2.
- dtype: optional depth of the output array; if -1, dst will have depth src2.depth(), but in case of an array-by-array division, you can only pass -1 when src1.depth()==src2.depth().
See also
multiply, add, subtract
Overloaded parameters
C++ default parameters
- dtype: -1