java - OpenCV HoughLines only ever returning one line -


i've shifted opencv development python java, work on android device. first step port straightforward canny/houghlines algorithm. research, wound with:

    mat lines = inputframe.gray();      mat cny=new mat();      imgproc.canny(lines,cny,100,150);      mat lns = new mat();      imgproc.houghlinesp(cny, lns, 1, math.pi/180, 50, 20, 20);     log.w("mainactivity",string.valueof(lns.cols()));       return cny; 

the problem code prints '1' or '0' lines. same angle python code, returned 100s of lines same threshold , other values, code returns one.

i've tried tuning of parameters, no luck. returned mat canny shows reasonable edges, houghlines (both standard, , probabilistic) return 1 line.

what missing?

the rows , columns different in java wrapper. instead of .cols use .rows , when want data instead of lines.get(0, i) use lines.get(i, 0)


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -