title: how to calculate and use cvMat mean value
body: <p>In the openCV cheat sheet (C++), I have found the matrix opration <a href="https://docs.opencv.org/3.4/d2/de8/group__core__array.html#ga191389f8a0e58180bb13a727782cd461" rel="nofollow noreferrer"><code>mean()</code></a>. When I use it:</p>
  <pre><code>float myMatMean = mean( MyMat );
  </code></pre>
  <p>I get the error:</p>
  <blockquote>
  <p>no suitable conversion function from &quot;cv::Scalar&quot; to &quot;float&quot; exists</p>
  </blockquote>
  <p>What can I do in order to use this data?</p>