Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

How to install opencv2.4.9 on debian 7.6

Programming languages, Coding, Executables, Package Creation, and Scripting.
Post Reply
Message
Author
cngxbdm
Posts: 2
Joined: 2014-10-14 11:24
Location: Chengdu ,China

How to install opencv2.4.9 on debian 7.6

#1 Post by cngxbdm »

I am a new man on using both of the opencv and debian. In china, few people use debian linux and have nothing paper about how to insall opencv on this os .
so my friends ,can you give me some detail step of installation of opencv on this OS ?thank you very much. :)

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: How to install opencv2.4.9 on debian 7.6

#2 Post by stevepusser »

There is an older version in the stable Debian 7.6 repositories, opencv 2.3.1


2.4.9 can be backported from the source code in Jessie (Debian Testing) and recompiled against the Wheezy libraries into packages without much trouble. I've currently only done this for my own use on amd64, so I could play around with packaging webcamoid:

http://opendesktop.org/content/show.php ... ent=144796

But I can backport and upload i386 packages also if you wish to try them out. The other choice is to request they be done for wheezy-backports.

You end up with the stock opencv and the newer version installed at the same time, which is OK because they have the version in the package name. You can have only one version of the -dev packages installed at the same time though, so you have to decide which ones you want installed if you wish to compile against the stock version or 2.4.9.
MX Linux packager and developer

cngxbdm
Posts: 2
Joined: 2014-10-14 11:24
Location: Chengdu ,China

Re: How to install opencv2.4.9 on debian 7.6

#3 Post by cngxbdm »

stevepusser wrote:There is an older version in the stable Debian 7.6 repositories, opencv 2.3.1


2.4.9 can be backported from the source code in Jessie (Debian Testing) and recompiled against the Wheezy libraries into packages without much trouble. I've currently only done this for my own use on amd64, so I could play around with packaging webcamoid:

http://opendesktop.org/content/show.php ... ent=144796

But I can backport and upload i386 packages also if you wish to try them out. The other choice is to request they be done for wheezy-backports.

You end up with the stock opencv and the newer version installed at the same time, which is OK because they have the version in the package name. You can have only one version of the -dev packages installed at the same time though, so you have to decide which ones you want installed if you wish to compile against the stock version or 2.4.9.
Thank you very much, sir.Though I can not grasp your words ,becuase of my terrible English and fresh man in computer. I will comprehend your each word.Thanks again,best wish for you from China. :D

MeanMachine
Posts: 2
Joined: 2015-02-22 09:10

Re: How to install opencv2.4.9 on debian 7.6

#4 Post by MeanMachine »

Just run the following commands, and it should work just fine.

Code: Select all

arch=$(uname -m)
if [ "$arch" == "i686" -o "$arch" == "i386" -o "$arch" == "i486" -o "$arch" == "i586" ]; then
flag=1
else
flag=0
fi
echo "Installing OpenCV 2.4.9"
mkdir OpenCV
cd OpenCV
echo "Removing any pre-installed ffmpeg and x264"
sudo apt-get -y remove ffmpeg x264 libx264-dev
echo "Installing Dependenices"
sudo apt-get -y install libopencv-dev
sudo apt-get -y install build-essential checkinstall cmake pkg-config yasm
sudo apt-get -y install libtiff4-dev libjpeg-dev libjasper-dev
sudo apt-get -y install libavcodec-dev libavformat-dev libswscale-dev libdc1394-22-dev libxine-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libv4l-dev
sudo apt-get -y install python-dev python-numpy
sudo apt-get -y install libtbb-dev
sudo apt-get -y install libqt4-dev libgtk2.0-dev
sudo apt-get -y install libfaac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-dev
sudo apt-get -y install x264 v4l-utils ffmpeg
sudo apt-get -y install libgtk2.0-dev
echo "Downloading OpenCV 2.4.9"
wget -O OpenCV-2.4.9.zip http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/2.4.9/opencv-2.4.9.zip/download
echo "Installing OpenCV 2.4.9"
unzip OpenCV-2.4.9.zip
cd opencv-2.4.9
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_V4L=ON -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=ON -D WITH_QT=ON -D WITH_OPENGL=ON ..
make -j4
sudo make install
sudo sh -c 'echo "/usr/local/lib" > /etc/ld.so.conf.d/opencv.conf'
sudo ldconfig
echo "OpenCV 2.4.9 ready to be used"
https://github.com/jayrambhia

Post Reply