Created
March 6, 2025 00:04
-
-
Save lizTheDeveloper/3b2f96482b17f50502571a41dcb2ee3f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone -b 4.10.0 https://github.com/opencv/opencv.git | |
git clone -b 4.10.0 https://github.com/opencv/opencv_contrib.git # optional | |
cd ./opencv | |
mkdir build && cd build | |
cmake -D CMAKE_BUILD_TYPE=Release \ | |
-D CMAKE_INSTALL_PREFIX=$PREFIX \ | |
-D CMAKE_OPENCV_VERBOSE=OFF \ | |
-D BUILD_SHARED_LIBS=ON \ | |
-D BUILD_TESTS=OFF -D BUILD_PERF_TESTS=OFF -D BUILD_EXAMPLES=OFF \ | |
-D WITH_QT=OFF -D WITH_GTK=OFF -D WITH_OPENGL=OFF \ | |
-D WITH_VTK=OFF -D WITH_IPP=OFF \ | |
-D WITH_TBB=OFF -D WITH_OPENMP=ON \ | |
-D WITH_FFMPEG=ON -D WITH_GSTREAMER=OFF \ | |
-D BUILD_OPENCV_PYTHON3=ON \ | |
-D OPENCV_ENABLE_NONFREE=ON \ | |
-D OPENCV_EXTRA_MODULES_PATH=~/src/opencv_contrib/modules .. | |
make -j$(nproc) # use all CPU cores to speed up compilation | |
make install # install OpenCV to $PREFIX (Termux's usr directory) | |
export LD_LIBRARY_PATH=$PREFIX/lib:$LD_LIBRARY_PATH | |
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment