ZJULearning / resa

Implementation of our paper 'RESA: Recurrent Feature-Shift Aggregator for Lane Detection' in AAAI2021.
Apache License 2.0
174 stars 35 forks source link

Aboat compiling Culane evaluation tools #44

Closed sabadijou closed 2 years ago

sabadijou commented 2 years ago

I always get the following error when I want to compile the evaluation tools using "make" command ############################# CXX src/counter.cpp In file included from include/lane_compare.hpp:4, from include/counter.hpp:4, from src/counter.cpp:8: include/spline.hpp:6:10: fatal error: opencv2/core.hpp: No such file or directory 6 | #include <opencv2/core.hpp> | ^~~~~~ compilation terminated. make: *** [Makefile:40: build/src/counter.o] Error 1 #################################

Although the Opencv C++ requirements are reinstalled, the mentioned error has always been raised.

Is there any solution to this error?

Turoad commented 2 years ago

I seems you don't install opencv. Make sure you have installed the opencv sudo apt-get install libopencv-dev. You may find the opencv in /usr/include. Check it.

sabadijou commented 2 years ago

Thank you for your answer @Turoad.

the mentioned command installs the latest version of Opencv (Opencv4). Additionally, the command copies Opencv lib files in "/user/include/opencv4", so the compiling procedure encounters the above error.

To solve the problem, I've copied the content of "/user/include/opencv4" directory to "/user/include" and also I've replaced lines 7 to 16 of "lane_compare.hpp" with the following lines.

include <opencv2/core/version.hpp>

include <opencv2/core/core.hpp>

include <opencv2/highgui/highgui.hpp>

include <opencv2/imgproc.hpp>

using namespace cv; using namespace std;

Turoad commented 2 years ago

I have not tested building with opencv4. Have you solved the problem? If not, you may try opencv3.

sabadijou commented 2 years ago

Yes. My previous comment is the solution to the problem.

Turoad commented 2 years ago

Congratulation, I will close this issue first.

Piscando commented 1 month ago

sudo apt-get install libopencv-dev``/usr/include

谢谢你的回答。

上述命令安装最新版本的 Opencv (Opencv4)。此外,该命令将 Opencv lib 文件复制到“/user/include/opencv4”中,因此编译过程会遇到上述错误。

为了解决这个问题,我已将“/user/include/opencv4”目录的内容复制到“/user/include”,并将“lane_compare.hpp”的第 7 行替换为以下行。

include < opencv2/core/version.hpp> #include < opencv2/core/core.hpp> #include < opencv2/highgui/highgui.hpp> #include < opencv2/imgproc.hpp> 使用命名空间 cv;使用命名空间 std;

我也遇到了这个问题,按照方法没有解决,opencv的版本不支持