title: Using drawContours OpenCV function in python
body: <p>I have installed OpenCV 2.2 and when I try to use drawContours I get the following error:</p>
  
  <pre><code>cv.drawContours(frame, contours, 0, cv.RGB(255, 0, 0))
  TypeError: &lt;unknown&gt; is not a numpy array
  </code></pre>
  
  <p>The code related to this error is the following:</p>
  
  <pre><code>storage = cv.CreateMemStorage(0)
  contours = cv.FindContours (color_mask, storage, method = cv.CV_CHAIN_APPROX_SIMPLE)
  cv.drawContours(frame, contours, 0, cv.RGB(255, 0, 0))
  </code></pre>
  
  <p>The python documentation does not correspond with the correct order of parameters (I know the correct order thank to IDLE) and the C++ documentation for this function does not help me very much</p>
  
  <p>Here is the full code (relevant code):</p>
  
  <pre><code>    cv.NamedWindow("MyWindow", 1)
      capture = cv.CaptureFromCAM(0)
  
      while 1:
          frame = cv.QueryFrame(capture)
  
          color_mask = cv.CreateImage(cv.GetSize(frame), 8, 1)
  
          cv.InRangeS(frame, cv.Scalar(*min_color), cv.Scalar(*max_color), color_mask)
  
          cv.CvtColor(frame, frame, cv.CV_BGR2HSV)
  
          storage = cv.CreateMemStorage(0)
          contours = cv.FindContours (color_mask, storage, method = cv.CV_CHAIN_APPROX_SIMPLE)
          cv.drawContours(image = frame, contours = contours, contourIdx = 0, color = cv.RGB(255, 0, 0))
  
          cv.ShowImage("MyWindow", frame)
  </code></pre>
  
  <p>Thanks in advance</p>