Python OpenCv gives error 'cv2.cv.cvseq' object has no attribute 'total' -


i looking image edge detection code in python on web , found interesting stuff wanted take at. unfortunately keep getting error: 'cv2.cv.cvseq' object has no attribute 'total'

the line of code @ fault is

lines = houghlines2( dst, storage, cv_hough_standard, 1, cv_pi/180, 100, 0, 0 ); 

the whole code has option toggle between hough standard , hough probabilistic, when set use probabilistic approach (and not requiring "lines.total" piece of code) runs fine, i'm have need installed , imported.

i don't know why use old 'cv' version, while new 'cv2' version quite simple , objects returned either python list or numpy array, easy handle user point of view.

output of houghlines functions numpy array of shapes (1,number of lines,2) , (1,number of lines,4). can whatever want since have numpy functions @ hand.

here sample detecting lines, same mentioned, ie toggling between hough standard , hough probabilistic: houghlines.py

below results obtained using code :

hough standard :

enter image description here

hough probabilistic :

enter image description here

of course line detected depends on parameter values try. change parameter values , try.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -