title: OpenCV submatrix access: copy or reference?
body: <p>If I extract a submatrix from a matrix using</p>
  
  <pre><code>cv::Mat A = cv::Mat::ones(4,4);
  
  cv::Mat B = A( cv::Rect( 1, 1, 2, 2 ) );
  </code></pre>
  
  <p>Is "B" a copy of those values from "A" or does it reference to those values?</p>
  
  <p>Could you provide an example of how to get </p>
  
  <p>(1) a copy of the submatrix?</p>
  
  <p>(2) a reference to the submatrix?</p>