Install LATEST OpenCV 4.8.0 | Ubuntu OpenCV Installation 2023

preview_player
Показать описание
OpenCV 4.8.0 has just been released so I wanted to update my OpenCV version also I wanted to show you how to install OpenCV. You can reach some commands below which I used in the video.

Downloading commands:

Checking OpenCV version if installed properly:
- pkg-config --modversion opencv4
cmake command:
cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D INSTALL_C_EXAMPLES=OFF \
-D INSTALL_PYTHON_EXAMPLES=OFF \
-D ENABLE_FAST_MATH=ON \
-D BUILD_opencv_java=OFF \
-D BUILD_ZLIB=ON \
-D BUILD_TIFF=ON \
-D WITH_GTK=ON \
-D WITH_FFMPEG=ON \
-D WITH_1394=ON \
-D OPENCV_GENERATE_PKGCONFIG=ON \
-D OPENCV_ENABLE_NONFREE=ON \
-D WITH_GSTREAMER=ON \
-D WITH_V4L=ON \
-D WITH_QT=ON \
-D WITH_OPENGL=ON \
-D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules \
-D BUILD_EXAMPLES=ON ..

▬ Contents of this video ▬▬▬▬▬▬▬▬▬▬

0:00 - Introduction & warnings
2:02 - Installation part
7:44 - Testing OpenCV

If you see any mistake and any advice please comment. Thanks for watching...

#opencv, #install, #ubuntu
Рекомендации по теме
Комментарии
Автор

I installed OpenCV C++ but I am unsure how to use it in VSCode. I am a beginner in Ubuntu and C++ OpenCV, could you please create a video tutorial on how to connect OpenCV C++ in VSCode? Additionally, I would appreciate an explanation on what CMake is, why it is used, and some fundamentals related to the OpenCV environment. Thank you.

naveensri
Автор

When 'make -j4', it stops at 29% due to errors make[2]: * Error 1
make[1]: * [CMakeFiles/Makefile2:5368: Error 2
Any recommendation to solve the errors?

YenLau-cm
Автор

This is a great tutorial! I am doing this setup within a Docker container and my code (which resembles yours) seems to compile but I keep getting the error "Can't initialize GTK backend in function 'cvInitSystem'". Would you know how I can go about fixing this GUI problem?

shreyaskhati