title: How do you force the type of data in a cv::Mat to be float upon creation?
body: <p>When iterating through a cv::Mat to output all of its values, you could do the following:</p>
  
  <pre><code>for (int r = 0; r &lt; t.rows; r++)
  {
      for (int c = 0; c &lt; t.cols; c++)
      {
          std::cout &lt;&lt; t.at&lt;float&gt;(r,c) &lt;&lt; ", ";
      }
      std::cout &lt;&lt; std::endl &lt;&lt; std::endl;
  }
  </code></pre>
  
  <p>However, if the information stored in that array is not of type float, this will crash.  How do you enforce the type of this matrix?</p>