[−][src]Function opencv::core::mean_std_dev
pub fn mean_std_dev(
src: &dyn ToInputArray,
mean: &mut dyn ToOutputArray,
stddev: &mut dyn ToOutputArray,
mask: &dyn ToInputArray
) -> Result<()>
Calculates a mean and standard deviation of array elements.
The function cv::meanStdDev calculates the mean and the standard deviation M of array elements independently for each channel and returns it via the output parameters: When all the mask elements are 0's, the function returns mean=stddev=Scalar::all(0).
Note: The calculated standard deviation is only the diagonal of the complete normalized covariance matrix. If the full matrix is needed, you can reshape the multi-channel array M x N to the single-channel array M*N x mtx.channels() (only possible when the matrix is continuous) and then pass the matrix to calcCovarMatrix .
Parameters
- src: input array that should have from 1 to 4 channels so that the results can be stored in Scalar_ 's.
- mean: output parameter: calculated mean value.
- stddev: output parameter: calculated standard deviation.
- mask: optional operation mask.
See also
countNonZero, mean, norm, minMaxLoc, calcCovarMatrix
C++ default parameters
- mask: noArray()