Skip to content
This repository was archived by the owner on Apr 29, 2025. It is now read-only.

Installation. opencv

Vladimir Goncharov edited this page Apr 2, 2023 · 3 revisions

installation opencv on ubuntu from packages:

apt update && apt install -y wget
wget https://raw.githubusercontent.com/php-opencv/php-opencv-packages/master/opencv_4.7.0_amd64.deb && dpkg -i opencv_4.7.0_amd64.deb && rm opencv_4.7.0_amd64.deb

installation opencv on ubuntu from sources:

apt update && apt install -y wget pkg-config cmake git checkinstall
git clone https://github.com/opencv/opencv_contrib.git && git clone https://github.com/opencv/opencv.git
cd opencv_contrib && git checkout tags/4.7.0 && cd ../opencv && git checkout tags/4.7.0 && cd ..
mkdir build && cd build && cmake -D OPENCV_GENERATE_PKGCONFIG=YES -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D OPENCV_EXTRA_MODULES_PATH=../opencv_contrib/modules ../opencv
cd build && make -j16
ldconfig
make install

Clone this wiki locally