[Tutorial] Setup openCV library with Visual Studio Code over UBUNTU

preview_player
Показать описание
The tutorial on how to setup OpenCV library on Visual Studio Code over UBUNTU is presented in this video. Which is helpful for beginners.
The tutorial on installing OpenCV library as follows:
1. Install dependencies
sudo apt install build-essential cmake git pkg-config libgtk-3-dev \
libavcodec-dev libavformat-dev libswscale-dev libv4l-dev \
libxvidcore-dev libx264-dev libjpeg-dev libpng-dev libtiff-dev \
gfortran openexr libatlas-base-dev python3-dev python3-numpy \
libtbb2 libtbb-dev libdc1394-22-dev
2. Clone opencv and contrib repositories
mkdir ~/opencv_build && cd ~/opencv_build
3. Create temporary build directory
cd ~/opencv_build/opencv
mkdir build
cd build
4. Setup opencv
cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D INSTALL_C_EXAMPLES=ON \
-D INSTALL_PYTHON_EXAMPLES=ON \
-D OPENCV_GENERATE_PKGCONFIG=ON \
-D OPENCV_EXTRA_MODULES_PATH=~/opencv_build/opencv_contrib/modules \
-D BUILD_EXAMPLES=ON ..
5. compilation process
make -j{number of processors' cores}

6. make install

7. import opencv package
OPENCV = `pkg-config opencv4 --cflags --libs`
Рекомендации по теме
Комментарии
Автор

This works, thanks. I would've loved the video even more if your audio was a bit loud and clear :)

sameersharma
Автор

Your video did save me a lot of time among those ancient, outdated tutorials out there! Thank you so much! Pardon me but are you vietnamese? :))

nguyenhuands
Автор

Great video!
but may i ask a question? why im getting "./[file name]: No such file or directory when trying to running it from the terminal?

aryaabdulaziz
Автор

Do I need to do this every single time I try to compile and run the code?

ashwijanilkumar
Автор

import opencv package
OPENCV = `pkg-config opencv4 --cflags --libs`


I cannot run this command it will shows import opencv package
OPENCV = `pkg-config opencv4 --cflags --libs`
OPENCV: command not found


how can I fix it

arthurshen
Автор

Music is soo f*** loud that can't hear anything

muhammadusmanbutt