Created
August 8, 2020 04:00
-
-
Save rohitrawat/d6c19529576f174c92b9b90903dcb3ad to your computer and use it in GitHub Desktop.
OpenCV 2.4 from source with ffmpeg on and QT off and CUDA off, fixed download link
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
version="2.4.12" | |
echo "Installing OpenCV" $version | |
mkdir OpenCV | |
cd OpenCV | |
echo "Removing any pre-installed ffmpeg and x264" | |
apt-get -qq remove ffmpeg x264 libx264-dev | |
echo "Installing Dependenices" | |
apt-get -qq install libopencv-dev build-essential checkinstall cmake pkg-config yasm libjpeg-dev libjasper-dev libavcodec-dev libavformat-dev libswscale-dev libdc1394-22-dev libxine-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libv4l-dev python-dev python-numpy libtbb-dev libqt4-dev libgtk2.0-dev libfaac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-dev x264 v4l-utils ffmpeg wget unzip | |
echo "Downloading OpenCV" $version | |
wget -O OpenCV-$version.zip https://github.com/opencv/opencv/archive/$version.zip | |
echo "Installing OpenCV" $version | |
unzip OpenCV-$version.zip | |
cd opencv-$version | |
mkdir build | |
cd build | |
#cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D WITH_V4L=ON -D WITH_QT=ON -D WITH_OPENGL=ON .. | |
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D WITH_V4L=ON -D WITH_QT=OFF -D WITH_CUDA=OFF -D WITH_OPENGL=ON .. | |
make -j32 | |
make install | |
sh -c 'echo "/usr/local/lib" > /etc/ld.so.conf.d/opencv.conf' | |
ldconfig | |
echo "OpenCV" $version "ready to be used" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment