title: OpenCV/ C++ Rectangle mask cannot cover over all the region from the original frame
body: <p>There is my code and screenshot for creating a mask and it seems strange that the size of mask did not cover over all the original frame. Any tips here please?</p>
  
  <pre><code>    *cap &gt;&gt; frame1;
      Rect roi(100,100,100,100);
      for(int i =0; i&lt;frame1.rows; i++)
      {
          for(int j=0; j&lt;frame1.cols;j++)
          {
              if(!roi.contains(Point(i,j)))
              {
                  frame1.at&lt;uchar&gt;(i,j) = 0;
              }
          }
      }
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/PQZYh.jpg" alt="enter image description here"></p>