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:
img = cv2.imread(argv[0],0)
Then trying to use the following function:
def _getCircles(img):
_circles = cv2.HoughCircles(img,cv2.cv.CV_HOUGH_GRADIENT,1,20,param1=50,param2=30,minRadius=1,maxRadius=20)
But returns the error:
cv2.error: error: (-206) Unrecognized or unsupported array type in function cvGetMat
However if I load the file directly ie change argv[0] to the explicit filename everything works perfectly. Any ideas?