title: OpenCV: Getting the total of Mat values
body: <p>Is there some openCV function that I can pass in a <code>cv::Mat</code> and get the sum of all values in them?</p>
  
  <p>For example: <code>int cvSumFoo(Mat &amp;srcMat)</code>; I'm expecting an int to come back</p>
  
  <p>I create it like this:</p>
  
  <pre><code>srcMat= new Mat(rows, cols, CV_8U);
  </code></pre>
  
  <p>I would like to avoid creating my own loop if at all possible.</p>