1) Remove existing opencv from UDOO by using this command:
find the location of opencv file and delete (login as root)
$
sudo find / -name "*opencv*" -exec rm -i {} \;2) Update and upgrade by using this command
$
sudo apt-get update$
sudo apt-get upgrade3) Install this package
$
sudo apt-get install build-essential cmake pkg-config$
sudo apt-get install libjpeg8-dev libtiff4-dev libjasper-dev libpng12-dev$
sudo apt-get install libgtk2.0-dev$
sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev$
sudo apt-get install libatlas-base-dev gfortran4)Start to build and compile opencv
$
wget -O opencv-2.4.10.zip http://sourceforge.net/projects/opencvlibrary/files/opencv- unix/2.4.10 /opencv-2.4.10.zip/download$
unzip opencv-2.4.10.zip $
cd opencv-2.4.10 $
mkdir build $
cd build $
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_NEW_PYTHON_SUPPORT=ON -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=ON .. $
make -j4 (using 4 core) or $make(single core)*if you receive error message during compilation, retry again to compile until success..
$
sudo make installdone.....
source:
http://www.pyimagesearch.com/2015/02/23/install-opencv-and-python-on-your-raspberry-pi-2-and-b/
UDOO
ReplyDeleteBuy Pest Control Products, Organic Fertilisers, Natural Insecticide and Equipment. Expert advice and Treatment Guides Ensure Optimum Results. Free Delivery.