LineSegmentMatching icon indicating copy to clipboard operation
LineSegmentMatching copied to clipboard

Modified to work in UBUNTU 18.04 and OPENCV3

Open joanpepcompany opened this issue 5 years ago • 4 comments

I have modified the CMAKELIST and some OPENCV functions in order to work in Ubuntu18.04 and OpenCV 3. The code has been tested and with the test images that you provide show the same results than the result.txt attached. Best regards, Joan Pep Company

joanpepcompany avatar Jul 04 '19 10:07 joanpepcompany

Appreciated. Thanks.

kailigo avatar Jul 04 '19 13:07 kailigo

(Using opencv 4 and macOS)

I manually made the changes you have done @joanpepcompany I'm getting the error - fatal error: 'cv.h' file not found"cv.

Any help ?

harshitsankhla avatar Apr 04 '20 04:04 harshitsankhla

Hello, I have modified the code for OpenCV3, I think the problem is because OpenCV4 does no more install the deprecated (1.0) c-api header. [ https://answers.opencv.org/question/225224/opencvcvh-not-found/ ]. The previous website presents a solution to your problem but I can't test it because I only have OpenCV 3. This solution is to change the headers from #include <opencv/cv.h> to #include <opencv2/opencv.hpp>. I have seen that the headers to change appears in: src/IO.h, src/main.cpp, src/PartiallyRecoverConnectivity.h, src/MatOperation.h, src/LineMatching.h. If it does not work I strongly recommend that you change to the OpenCV3.
Regards, Joan Pep

joanpepcompany avatar Apr 05 '20 07:04 joanpepcompany

There are plenty more issues after that, especially with the C API identifiers (eg. error: use of undeclared identifier 'CV_REDUCE_SUM'; did you mean 'REDUCE_SUM'). Will get a system with OpenCV3. Also CV4 requires c++ 11 standard. Just keeping this here for any other poor soul to save some time.

harshitsankhla avatar Apr 07 '20 05:04 harshitsankhla