LineSegmentMatching
LineSegmentMatching copied to clipboard
Modified to work in UBUNTU 18.04 and OPENCV3
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
Appreciated. Thanks.
(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 ?
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
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.