title: Need to get the content of a boundary box in a separate image
body: <p>I wrote a piece of code which draws a boundary box around an object of interest.
  Next step is to resize the boundary box so I have a little bit of background with it.
  Now I want to get the contents of the boundary box in a separate image so I can process this region of interest. The code I wrote is:</p>
  
  <pre><code>findContours(Sal11, Objects, CV_RETR_LIST, CV_CHAIN_APPROX_NONE);
  
         //Kleine contouren verwijderen.
         for(unsigned int i = 0; i &lt; Objects.size(); i++)
         {
             if (Objects[i].size() &gt; 250 &amp;&amp; Objects[i].size() &lt; 500)
                 Objects2.push_back(Objects[i]);
         }
  
         cv::Mat Person=input;
         // Bounding Box
         for(unsigned int i = 0; i &lt; Objects2.size(); i++)
         {
             Rect rect = boundingRect(Objects2[i]);
             Point pt1, pt2;
             pt1.x = rect.x - 100;
             pt1.y = rect.y;
             pt2.x = rect.x + rect.width + 100;
             pt2.y = rect.y + rect.height;
             rectangle(input, pt1, pt2, CV_RGB(0,0,255), 1);
             cout &lt;&lt; rect &lt;&lt; endl;
  
             Rect rect2;
             Person = input(rect);
         }
  </code></pre>
  
  <p><code>rect2</code> does not do a thing right now but I want it to be the content of <code>rect</code>. with <code>pt1</code> and <code>pt2</code> I resize the bounding box. The code is meant for real-time processing.</p>