Closed suroot180127 closed 4 years ago
You may have an older version of OpenCV - you need version 3.4 or later.
See: https://docs.opencv.org/3.4/d3/d50/group__imgproc__colormap.html
Also check that your Pro file is configured, you need to set the correct include directory (it's set up for OpenCV 4, but perhaps you don't have it installed).
i am using Opencv 4.1.1 but i dont know how to configure pro file .Please give some guidance
Do you have pkg-config
installed?
sudo apt-get install -y pkg-config
And then can you check if the install folder actually exists /usr/local/include/opencv4
- it's possible you've installed it to another prefix, e.g. /usr/local/include/opencv
.
@jveitchmichaelis i checked installation directory as well it is also correct
unix:!macx{ message("Linux")
INCLUDEPATH += /usr/local/include/opencv4 LIBS += -L/usr/local/lib -lopencv_core -lopencv_highgui -lopencv_imgproc -lopencv_imgcodecs -lopencv_tracking -lopencv_video -lopencv_videoio -lopencv_dnn }
One thing is to check that those colornap macros actually exist in the header. They should be in imgproc.hpp - https://docs.opencv.org/master/d1/d4f/imgproc_2include_2opencv2_2imgproc_8hpp.html
Do you have Magma, Viridis, etc?
@jveitchmichaelis should i include #include "opencv2/core.hpp" in imagedisplay.h file or i have to install something ? and what do you mean by magma,Virdis,etc?
The header is already included in deeplabel. The error you're getting is that a bunch of colormaps are not defined. Those colormaps were only introduced in a recent version of opencv. Given the message you're seeing, it looks like you're including some version of OpenCV because the compiler is suggesting alternatives (eg COLORMAP_SPRING). So I think you should check that your installed opencv actually has definitions for COLORMAP_MAGMA (and the others).
If you find them, then that suggests you're somehow including a different opencv installation. If you don't, then you know you need to rebuild opencv.
@jveitchmichaelis you are right opencv4.0 does not has colormap i installed latest version of opencv and my issued was fixed .I successfully make the file but i dont know to launch the deep label please help.
Once you've run make, you should get a file called, deeplabel
- try running that eg from your terminal:
./build_folder/deeplabel
@jveitchmichaelis thanks deeplabel run successfully
make -j4 g++ -c -pipe -O2 -std=gnu++1y -Wall -W -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_SQL_LIB -DQT_TESTLIB_LIB -DQT_CONCURRENT_LIB -DQT_CORE_LIB -DQT_TESTCASE_BUILDDIR='"/home/user/deeplabel"' -I. -isystem /usr/local/include/opencv4 -Isrc -IQtAwesome/QtAwesome -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtSql -isystem /usr/include/x86_64-linux-gnu/qt5/QtTest -isystem /usr/include/x86_64-linux-gnu/qt5/QtConcurrent -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I.moc -isystem /usr/include/libdrm -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o .obj/main.o src/main.cpp g++ -c -pipe -O2 -std=gnu++1y -Wall -W -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_SQL_LIB -DQT_TESTLIB_LIB -DQT_CONCURRENT_LIB -DQT_CORE_LIB -DQT_TESTCASE_BUILDDIR='"/home/user/deeplabel"' -I. -isystem /usr/local/include/opencv4 -Isrc -IQtAwesome/QtAwesome -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtSql -isystem /usr/include/x86_64-linux-gnu/qt5/QtTest -isystem /usr/include/x86_64-linux-gnu/qt5/QtConcurrent -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I.moc -isystem /usr/include/libdrm -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o .obj/mainwindow.o src/mainwindow.cpp g++ -c -pipe -O2 -std=gnu++1y -Wall -W -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_SQL_LIB -DQT_TESTLIB_LIB -DQT_CONCURRENT_LIB -DQT_CORE_LIB -DQT_TESTCASE_BUILDDIR='"/home/user/deeplabel"' -I. -isystem /usr/local/include/opencv4 -Isrc -IQtAwesome/QtAwesome -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtSql -isystem /usr/include/x86_64-linux-gnu/qt5/QtTest -isystem /usr/include/x86_64-linux-gnu/qt5/QtConcurrent -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I.moc -isystem /usr/include/libdrm -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o .obj/gcpexporter.o src/gcpexporter.cpp g++ -c -pipe -O2 -std=gnu++1y -Wall -W -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_SQL_LIB -DQT_TESTLIB_LIB -DQT_CONCURRENT_LIB -DQT_CORE_LIB -DQT_TESTCASE_BUILDDIR='"/home/user/deeplabel"' -I. -isystem /usr/local/include/opencv4 -Isrc -IQtAwesome/QtAwesome -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtSql -isystem /usr/include/x86_64-linux-gnu/qt5/QtTest -isystem /usr/include/x86_64-linux-gnu/qt5/QtConcurrent -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I.moc -isystem /usr/include/libdrm -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o .obj/imagedisplay.o src/imagedisplay.cpp In file included from src/imagedisplay.cpp:1: src/imagedisplay.h:49:26: error: ‘COLORMAP_MAGMA’ is not a member of ‘cv’; did you mean ‘COLORMAP_PARULA’? 49 | int colour_map = cv::COLORMAP_MAGMA; | ^, int>::unordered_map()’
~~~~~ | COLORMAP_PARULA src/imagedisplay.cpp:5:22: error: ‘COLORMAP_CIVIDIS’ is not a member of ‘cv’; did you mean ‘COLORMAP_PINK’? 5 | { "Cividis", cv::COLORMAP_CIVIDIS }, | ^~~~| COLORMAP_PINK src/imagedisplay.cpp:6:22: error: ‘COLORMAP_INFERNO’ is not a member of ‘cv’; did you mean ‘COLORMAP_WINTER’? 6 | { "Inferno", cv::COLORMAP_INFERNO }, | ^~~~| COLORMAP_WINTER src/imagedisplay.cpp:7:20: error: ‘COLORMAP_MAGMA’ is not a member of ‘cv’; did you mean ‘COLORMAP_PARULA’? 7 | { "Magma", cv::COLORMAP_MAGMA }, | ^~~~~~ | COLORMAP_PARULA src/imagedisplay.cpp:10:21: error: ‘COLORMAP_PLASMA’ is not a member of ‘cv’; did you mean ‘COLORMAP_PARULA’? 10 | { "Plasma", cv::COLORMAP_PLASMA }, | ^~~~~~~ | COLORMAP_PARULA src/imagedisplay.cpp:14:22: error: ‘COLORMAP_VIRIDIS’ is not a member of ‘cv’; did you mean ‘COLORMAP_SPRING’? 14 | { "Viridis", cv::COLORMAP_VIRIDIS } | ^~~~| COLORMAP_SPRING src/imagedisplay.cpp:15:1: error: no matching function for call to ‘std::unordered_map<std::__cxx11::basic_string