Ask Your Question

AlexLEE's profile - activity

2013-09-24 04:11:33 -0600 commented question OpenCV-Python build problem with HoughCircles function

I'm a newer. Learning python language is just a few days.

2013-09-24 04:08:16 -0600 commented question OpenCV-Python build problem with HoughCircles function

hi! It's cv2, version 2.4.6, and with Python2.7.5 on windows sys. The symbol 'opencv' is the cv2.cv and in the program is : import cv2.cv as opencv

2013-09-24 01:04:52 -0600 asked a question OpenCV-Python build problem with HoughCircles function

The code is:

hougharr=opencv.CreateMemStorage(0)#64k
result=opencv.HoughCircles(edge,hougharr,opencv.CV_HOUGH_GRADIENT,2,edge.width/10)

and the error code is:

TypeError: Argument 'circle_storage' must be CvMat. Use fromarray() to convert numpy arrays to CvMat

ANOTHER PROBLEM:

The code is:

hougharr=opencv.CreateMemStorage(0)#64k
opencv.fromarray(hougharr)
result=opencv.HoughCircles(edge,hougharr,opencv.CV_HOUGH_GRADIENT,2,edge.width/10)

and the error code is:

TypeError: object does not have array interface

What should I do to correct the mistakes?