title: OpenCV using command line argument for input image (Python)
body: <p>I am trying to load an image from a file specified on the command line then process it using the OpenCV command HoughCircles. What happens is that I am opening the file:</p>
  
  <pre><code>img = cv2.imread(argv[0],0)
  </code></pre>
  
  <p>Then trying to use the following function:</p>
  
  <pre><code>def _getCircles(img):
    _circles = cv2.HoughCircles(img,cv2.cv.CV_HOUGH_GRADIENT,1,20,param1=50,param2=30,minRadius=1,maxRadius=20)
  </code></pre>
  
  <p>But returns the error:</p>
  
  <pre><code>cv2.error: error: (-206) Unrecognized or unsupported array type in function cvGetMat
  </code></pre>
  
  <p>However if I load the file directly ie change argv[0] to the explicit filename everything works perfectly. Any ideas?</p>