hls::AvgSdv


Synopsis


1. without mask:
template<int ROWS, int COLS, int SRC_T, typename _T>
void hls::AvgSdv( hls::Mat<ROWS, COLS, SRC_T>& src,
                  hls::Scalar<HLS_MAT_CN(SRC_T), _T>& avg,
                  hls::Scalar<HLS_MAT_CN(SRC_T), _T>& sdv );
2. with mask:
template<int ROWS, int COLS, int SRC_T, typename _T>
void hls::AvgSdv( hls::Mat<ROWS, COLS, SRC_T>& src,
                  hls::Scalar<HLS_MAT_CN(SRC_T), _T>& avg,
                  hls::Scalar<HLS_MAT_CN(SRC_T), _T>& sdv,
                  hls::Mat<ROWS, COLS, HLS_8UC1>& mask );

Parameters

  • src – the input image.
  • avg – the output scalar of computed mean value.
  • sdv – the output scalar of computed standard deviation.
  • mask – the operation mask, 8-bit single channel image, that specifies elements of the src image to be computed.

Description


Calculates an average of elements in image src, and return the result in hls::Scalar format.
If computes with mask:
AvgSdv.png
Image data must be stored in src(if computes with mask, maskmust have data stored). Invoking this function will consume the data in src(if computes with mask, the data of maskwill be also consumed).
src and maskmust have the same size. mask must have non-zero element.

OpenCV reference


cvAvgSdv, cv::meanStdDev