MeanStdDev 均值 标准差
来源:互联网 发布:政府数据共享交换 2017 编辑:程序博客网 时间:2024/06/05 09:59
计算单通道矩阵所有元素均值和标准差
Mat tmp_m, tmp_sd; double m = 0, sd = 0; m = mean(gray)[0]; meanStdDev(gray, tmp_m, tmp_sd); m = tmp_m.at<double>(0,0); sd = tmp_sd.at<double>(0,0);
mean, meanStdDev返回结果:double类型。
/** Calculates a mean and standard deviation of array elements.
The function meanStdDev calculates the mean and the standard deviation M
of array elements independently for each channel and returns it via the
output parameters:
\f[\begin{array}{l} N = \sum _{I, \texttt{mask} (I) \ne 0} 1 \\ \texttt{mean} _c = \frac{\sum_{ I: \; \texttt{mask}(I) \ne 0} \texttt{src} (I)_c}{N} \\ \texttt{stddev} _c = \sqrt{\frac{\sum_{ I: \; \texttt{mask}(I) \ne 0} \left ( \texttt{src} (I)_c - \texttt{mean} _c \right )^2}{N}} \end{array}\f]
When all the mask elements are 0's, the functions return
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 .
@param src input array that should have from 1 to 4 channels so that the results can be stored in
Scalar_ 's.
@param mean output parameter: calculated mean value.
@param stddev output parameter: calculateded standard deviation.
@param mask optional operation mask.
@sa countNonZero, mean, norm, minMaxLoc, calcCovarMatrix
*/
CV_EXPORTS_W void meanStdDev(InputArray src, OutputArray mean, OutputArray stddev, InputArray mask=noArray());
mean返回的值:Scalar,vector类型的数组,当要Scalar的元素,要用[n]方式访问。
meanStdDev以Mat形式返回1X1矩阵。- MeanStdDev 均值 标准差
- opencv 3.0 求均值 标准差 mean MeanStdDev
- opencv3.0 均值 标准差 函数 mean meanStdDev
- MATLAB均值和标准差
- c#画均值标准差图
- matlab 计算均值,方差,标准差
- 获得一组数据中的极值、均值、标准差
- 数学(1) 均值,方差,标准差,协方差
- 均值、方差、标准差、协方差、协方差矩阵
- opencv 2.4 中计算均值和方差的函数meanStdDev,其结果的类型
- 用excel图表误差线显示均值和标准差(转)
- 浅谈均值、方差、标准差、协方差的概念及意义
- 方差,协方差,标准差和均值标准差等各种差
- 均值-中位数-众数-极差-中程数-方差-标准差-变异系数
- 标准差
- 标准差
- 标准差
- 标准差
- 【Java集合类】HashSet解析
- 笔记:Newtonjson.Json自定义输出那些属性
- mybatis一对一
- Android扫一扫Zxing之基础依赖
- Linux 基本操作(一)————认识命令行、基础命令、快捷键
- MeanStdDev 均值 标准差
- Git学习笔记与IntelliJ IDEA整合
- 懂中文就能学会的高薪职位,你猜对了吗?
- rabbitmq设置日志级别和路径
- 行为型-命令模式(Command)
- 【Android】 使用okhttp实现注册登录功能(与服务器端)
- Qt QDateEdit 设置下拉日历
- USB Type-C学习点滴
- QNX下启动TF驱动和EMMC驱动的说明