title: drawing a rect with opencv on a frame
body: <p>I have a frame and want to draw a rectangle in specefic position a rectangle with:</p>
  
  <pre><code>#include "opencv2/opencv.hpp"
  #include &lt;opencv2/core/core.hpp&gt;
  #include &lt;opencv2/highgui/highgui.hpp&gt;
  #include&lt;conio.h&gt;
  
   int main () {
  cv::Mat frame = cv::imread("cmd.png");
      cvRectangle(
              &amp;frame,
              cvPoint(5,10),
              cvPoint(20,30),
              cvScalar(255,255,255)
         );
       cv::imshow("test " , frame);
  while (cv::waitKey() != 23) ;
  return 1; 
   }
  </code></pre>
  
  <p>wenn I run the code I get a memory error.</p>
  
  <pre><code> Unhandled exception at 0x000007fefd42caed in OpenCV_capture.exe: Microsoft C++ 
  exception: cv::Exception at memory location 0x0018ead0..
  </code></pre>
  
  <p>Any idea why do I get this, and how can I solve it   </p>