title: getting the value of stddev in float format in opencv
body: <p>I'm trying to get the value of the standard deviation of frame saved in a  float variable, here's what I've tried : </p>
  
  <pre><code>#include &lt;opencv2\core\core.hpp&gt;
  #include &lt;opencv2\highgui\highgui.hpp&gt;
  #include &lt;opencv2\imgproc\imgproc.hpp&gt;
  #include &lt;iostream&gt;
  
  
  int main (){
      cv::Mat frame,thresholdResult,contours, stddev , mean ;
      cv::Mat meanResult;
      cv::Scalar meanScalar,devScalar;
  
      double meanValue,stddevValue;
      cv::VideoCapture cap(2);
      cap &gt;&gt; frame;
      meanResult= cv::Mat::zeros (frame.rows,frame.cols,CV_32FC1); 
  
      while (cv::waitKey(10)!=27){
          cap &gt;&gt; frame;
          cv::cvtColor(frame,frame,CV_BGR2GRAY);
          cv::imshow("frame", frame);
          meanScalar = cv::mean(frame);
          meanValue = meanScalar[0];
          std::cout &lt;&lt;meanValue &lt;&lt; std::endl;
  
          cv::threshold(frame,thresholdResult,meanValue,255,CV_THRESH_BINARY);
          cv::imshow("threshold result " , thresholdResult);
          cv::blur(thresholdResult,thresholdResult,cv::Size(3,3));
          cv::Canny(thresholdResult,contours,125,350); // canny 
          cv::imshow(" canny " , contours);
          cv::meanStdDev(frame,mean,stddev);    // stddev number of channels is 
          stddevValue= stddev.at&lt;uchar&gt;(0,0);// here the program crashes   
  
  if(!stddev.empty())
              cv::imshow("stddev",stddev);
  
      }
      return 0;
  }
  </code></pre>
  
  <p>any  idea how can I get this solve ! </p>