Question

I am converting a set of codes written in OpenCV to JavaCV now i am trying to convert the following lines of code into JavaCV :

CvSeq lines = null;//Ref 9
lines = cvHoughLines2( Edges,
        storage,
        cv.CV_H,
        1,
        CV_PI/180,
        44,// threshold
        2,
        1 );

But i am getting following errors,

1) CV_HOUGH_PROBABILISTIC cannot be resolved 2) CV_PI cannot be resolved

Please help.

Was it helpful?

Solution

CV_PI is just a number. You can get in Java with Math.PI. CV_HOUGH_PROBABILISTIC should work (you wrote cv.CV_H ?).

CvSeq lines = null;//Ref 9
lines = cvHoughLines2( Edges,
        storage,
        CV_HOUGH_PROBABILISTIC,
        1,
        Math.PI/180,           
        44,// threshold
        2,
        1 );
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top