now we gonna learn about how to install opencv python2 and opencv c++ in ubuntu 14.04(LTS) version
Compile and install OpenCV 2.4.9
now copy
Run followling code for libaries
to check c++ opencv type in terminal
to check this lets run sample file.enter following command on terminal for facedetect through pythoncv
when you type and import cv2 in python if anything wrong thats goes next line >>
otherwise error will occurs
p.s
thankss for ur time to read this post
i have tested in my laptop dell 5000 series
Updated and upgraded
Install many dependenciessudo apt-get update sudo apt-get upgrade
To get the OpenCV 2.4.9 source codesudo apt-get install build-essential libgtk2.0-dev libjpeg-dev libtiff4-dev libjasper-dev libopenexr-dev cmake python-dev python-numpy python-tk libtbb-dev libeigen3-dev yasm libfaac-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-dev libx264-dev libqt4-dev libqt4-opengl-dev sphinx-common texlive-latex-extra libv4l-dev libdc1394-22-dev libavcodec-dev libavformat-dev libswscale-dev default-jdk ant libvtk5-qt4-dev
Generate mkdir filescd ~ wget http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/2.4.9/opencv-2.4.9.zip unzip opencv-2.4.9.zip cd opencv-2.4.9
mkdir build cd build cmake -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 -D WITH_VTK=ON ..
Compile and install OpenCV 2.4.9
Configure OpenCV
make sudo make install
sudo gedit /etc/ld.so.conf.d/opencv.conf
now copy
then press ctrl+x.then save and exit from that/usr/local/lib
Run followling code for libaries
now need to open file in that
sudo
ldconfig
now copy this two lines into that file at end of pagesudo
gedit /etc/
bash
.bashrc
now opencv python and c++ installed perfectlyPKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig export PKG_CONFIG_PATH
to check c++ opencv type in terminal
~/opencv-2.4.9/build/bin/cpp-example-calibration_artificial
to check this lets run sample file.enter following command on terminal for facedetect through pythoncv
python ~/opencv-2.4.9/samples/python2/facedetect.py

this is running facedetect smaple program.we can check also other method
in terminal lets type following things for wheather working proparly or not
>>import cv2$ python
when you type and import cv2 in python if anything wrong thats goes next line >>
otherwise error will occurs
p.s
thankss for ur time to read this post
i have tested in my laptop dell 5000 series
Great Article
ReplyDeleteFinal Year Projects for CSE in Python
FInal Year Project Centers in Chennai
JavaScript Training in Chennai
JavaScript Training in
Chennai