please dont rip this site

Image Recognition Method OpenCV on the Raspberry Pi

Setup on Raspian Linix

Pre-compiled: If it works, do this... It prolly won't, but it's worth a shot.

sudo apt-get install libopencv-dev

From Source: as per https://ariandy1.wordpress.com/2013/02/13/raspberry-pi-rasbian-opencv/

  1. Make sure everything is up to date
    sudo apt-get update
    sudo apt-get upgrade
    sudo rpi-update

     
  2. Install the tools (probably already installed)
    sudo apt-get install build-essential cmake pkg-config
  3. Paste all the folowing dependancy installations into the terminal window:
    sudo apt-get -y install build-essential
    sudo apt-get -y install cmake
    sudo apt-get -y install pkg-config
    sudo apt-get -y install libpng12-0 libpng12-dev libpng++-dev libpng3
    sudo apt-get -y install libpnglite-dev libpngwriter0-dev libpngwriter0c2
    sudo apt-get -y install zlib1g-dbg zlib1g zlib1g-dev
    sudo apt-get -y install libjasper-dev libjasper-runtime libjasper1
    sudo apt-get -y install pngtools libtiff4-dev libtiff4 libtiffxx0c2 libtiff-tools
    sudo apt-get -y install libjpeg8 libjpeg8-dev libjpeg8-dbg libjpeg-prog
    sudo apt-get -y install libavcodec53 libavcodec-dev libavformat53 libavformat-dev
    sudo apt-get -y install libavutil51 libavutil-dev libswscale2 libswscale-dev
    sudo apt-get -y install libgstreamer0.10-0-dbg libgstreamer0.10-0 libgstreamer0.10-dev
    sudo apt-get -y install libxine1-ffmpeg libxine-dev libxine1-bin
    sudo apt-get -y install libunicap2 libunicap2-dev
    sudo apt-get -y install libdc1394-22-dev libdc1394-22 libdc1394-utils
    sudo apt-get -y install swig
    sudo apt-get -y install python-numpy
    sudo apt-get -y install libpython2.6 python-dev python2.6-dev
    sudo apt-get -y install libjpeg-progs libjpeg-dev
    sudo apt-get -y install libgstreamer-plugins-base0.10-dev
    sudo apt-get -y install libqt4-dev libgtk2.0-dev
     
    
  4. Manually install x264:
    sudo apt-get remove x264 x264-dev
     
    wget ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20120528-2245-stable.tar.bz2
    tar -xvf x264-snapshot-20120528-2245-stable.tar.bz2
    cd x264-snapshot-20120528-2245-stable/
    ./configure --enable-shared --enable-pic
    make
    sudo make install
    cd ..
     
    
  5. Manually install ffmpeg: (note the configure line below is entered all on one line.)
    sudo apt-get remove ffmpeg
     
    wget http://ffmpeg.org/releases/ffmpeg-0.11.1.tar.bz2
    echo "Installing ffmpeg"
    tar -xvf ffmpeg-0.11.1.tar.bz2
    cd ffmpeg-0.11.1/
    ./configure --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb \
    --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid \
    --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab --enable-shared --enable-pic make sudo make install cd ..
  6. Maunally install l4v:
    wget http://www.linuxtv.org/downloads/v4l-utils/v4l-utils-0.8.8.tar.bz2
    tar -xvf v4l-utils-0.8.8.tar.bz2
    cd v4l-utils-0.8.8/
    make
    sudo make install
    cd ..
     
    
  7. Download the current version of OpenCV (replace version with the actual version)
    tar -xjvf  OpenCV-version.tar.bz2
    rm OpenCV-version.tar.bz2
    cd OpenCV-version/
    mkdir build
    cd build/
     
    
  8. Creat a standard configruation. Note, the following is entered all on one line
     
    sudo cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_NEW_PYTHON_SUPPORT=ON -D BUILD_EXAMPLES=ON .. | sudo tee ./CMAKE.log
     
    Check the CMAKE.log file to make sure there are no errors and that if found all the libraries. If there are missing files, find them and point OpenCV installer at them (e.g. with a symlink)
  9. Do the big compile. You probably want to start a new screen -S OpenCVInst then
    sudo su -
    make | tee make.log && make install | tee make_install.log
     
    Now you can detach the screen with Ctrl+a Ctrl+d and let it run. You can check the status with:
    tail -f make.log
     
    Compile times of overnight are the norm.
  10. Tell Linux about the new libraries with
    sudo echo /usr/local/lib>/etc/ld.so.conf.d/opencv.conf
    sudo ldconfig /etc/ld.so.conf.d
    sudo echo PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig>>/etc/bash.bashrc
    sudo echo export PKG_CONFIG_PATH>>/etc/bash.bashrc

See also:


file: /Techref/method/OpenCVonRasPi.htm, 6KB, , updated: 2015/10/23 15:31, local time: 2024/12/26 18:50,
TOP NEW HELP FIND: 
3.145.65.133:LOG IN

 ©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF="http://ecomorder.com/Techref/method/OpenCVonRasPi.htm"> Image Recognition Method OpenCV on the Raspberry Pi</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.


Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

 

Welcome to ecomorder.com!

 

Welcome to ecomorder.com!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .