Compile OpenCV4

twitter logo github logo ・1 min read

Since OpenCV4 does not generata .pc file by default, we need to compile it from source and turn ont the OPENCV_GENERATE_PKGCONFIG option if other programs need the pkg-config file.

Another problem I encountered is a number of errors similar to undefined reference to TIFFReadRGBAStrip@LIBTIFF_4.0. To solve that, the BUILD_TIFF option needs to be turned on.

And following is the script for compilation and installation.

cd opencv-4.1.0
mkdir build && cd build
sudo make -j`nproc`
sudo make install
twitter logo DISCUSS
Classic DEV Post from Feb 5

Overcoming the Tutorial Gap and Making Your Own Software

How to take the next step in the software development journey.

Gabriel Wu profile image
A writer. Writing academic papers, blogs, codes, documents, essays, novels, poems, and translations.

Don't ghost on us ❤️

Sign Up