title: Python OpenCV Box2D
body: <p>I am trying to call OpenCV function MinAreaRect2 from within python.
  I use OpenCV 2.4.2 with python 2.7 and numpy 1.6.
  I went this far :</p>
  
  <pre><code>import cv
  
  def nda2ipl(arr, dtype=None):
      return cv.fromarray(np.ascontiguousarray(arr, dtype=dtype))
  
  def min_area_rect2(points):
      storage = cv.CreateMemStorage()
      cv_points = nda2ipl(points.reshape((-1, 1, 2)))
      out = cv.MinAreaRect2(cv_points, storage)
  return out
  </code></pre>
  
  <p>I can call this function with a ndarray of shape (N x 2). I get this kind of results :</p>
  
  <pre><code>((476.5, 604.5), (951.0, 1207.0), -0.0)
  </code></pre>
  
  <p>I assume that the first tuple is the center of the box, the second gives the width and the height and the last is the angle.</p>
  
  <p>The problem is I could not get a clear reference stating this. Actually, the opencv documentation tells me what the functions returns in Python.</p>
  
  <p>I found the <a href="http://docs.opencv.org/modules/imgproc/doc/structural_analysis_and_shape_descriptors.html?highlight=minarearect#cv.MinAreaRect2" rel="noreferrer">official documentation about this function</a> but this is not very helpful.</p>
  
  <p>What are exactly the output of MinAreaRect2 in python ?
  More generally, where do you get precise documentation about the OpenCV python wrapper ?</p>