Skip to content

openCV 4.7.0 install

Kewei Yan edited this page Feb 15, 2023 · 3 revisions

prerequisites

libgtk2.0
pkg-config

build

Use -DOPENCV_GENERATE_PKGCONFIG=YES to create the .pc file for "pkg-config --cflags --lib opencv4"

wget -O opencv.zip https://github.com/opencv/opencv/archive/4.x.zip
unzip opencv.zip
mkdir -p build && cd build
cmake  ../opencv-4.x -DOPENCV_GENERATE_PKGCONFIG=YES
cmake --build .

install

make install