title: Approximating a contour with rotated rectangles
body: <p>After some color detection and binary thresholding, I use the following code to find the contours and draw them onto the image:</p>
  
  <pre><code> using (MemStorage stor = new MemStorage())
          {
             Contour&lt;Point&gt; contours = img.FindContours(
                Emgu.CV.CvEnum.CHAIN_APPROX_METHOD.CV_CHAIN_APPROX_SIMPLE,
                Emgu.CV.CvEnum.RETR_TYPE.CV_RETR_LIST,
                stor);
  
             for (; contours != null; contours = contours.HNext)
             {
                Contour&lt;Point&gt; currentContour = contours.ApproxPoly(contours.Perimeter * poly, stor);
  
                img.Draw(currentContour,new Bgr(255,255,255),1);
  
                Rectangle currentrect = currentContour.BoundingRectangle;
  
                img.Draw(currentrect,new Bgr(255,255,255),2);
              }
          }
  </code></pre>
  
  <p>My problem is, as I expected, that if the contour is a rectangle but is rotated in the image, the bounding rectangle does not change its orientation to fit the rotation. Is their another way to accomplish this function? Any help would be greatly appreciated.</p>