title: why this program is crashing
body: <p>I wrote a small program in which, I want to set the value of a frame to 255 based on a  vector: </p>
  
  <pre><code>result =    cv::Mat::zeros(frame.size(),CV_8UC1);
  std::vector&lt;cv::Point2f&gt; imageCorners;
  .......................................................
      for ( int i = 0 ; imageCorners.size();i++){
                  std::cout &lt;&lt; imageCorners[i]&lt;&lt; std::endl;
                  result.at&lt;uchar&gt;(imageCorners[i]) = 255;
                  cv::imshow("result",result);
              }
  </code></pre>
  
  <p>my question is: why the program crashes just after finishing the loop ?? even I see that result is correct ? the error message that I get is :</p>
  
  <pre><code>vector subscript out of range 
  </code></pre>