View Single Post
  #21   Spotlight this post!  
Unread 20-01-2015, 18:18
faust1706's Avatar
faust1706 faust1706 is offline
Registered User
FRC #1706 (Ratchet Rockers)
Team Role: College Student
 
Join Date: Apr 2012
Rookie Year: 2011
Location: St Louis
Posts: 498
faust1706 is infamous around these partsfaust1706 is infamous around these parts
Re: OpenCV for RoboRio - Release

tl;dr of this thread (copied from http://www.reddit.com/r/FRC/comments...or_roborio_on/) Credit goes to u/ironmig
  1. Install dependencies
    sudo apt-get install build-essential
    sudo apt-get install cmake
    sudo apt-get install gcc-arm-linux-gnueabi
    sudo apt-get install g++-arm-linux-gnueabi
  2. Enter directory that will hold opencv
    cd ~/Documents
  3. Clone OpenCV from git
    git clone https://github.com/Itseez/opencv.git
  4. Checkout to a recent OpenCV release (change 2.4.10.1 to a recent release)
    cd opencv
    git checkout tags/2.4.10.1
  5. Set toolchain to correct version of g++ (change line in file or run this complicated one-liner
    cd platforms/linux
    x=$(dpkg -s g++-arm-linux-gnueabi | grep "Version" | grep -o "..."); sed -i 's/set(GCC_COMPILER_VERSION "."/set(GCC_COMPILER_VERSION \"'$x'\" CACHE STRING "GCC Compiler version"/g' arm-gnueabi.toolchain.cmake
  6. Prepare file for build
    mkdir build_roborio
    cd build_roborio
    cmake -DSOFTFP=ON -DCMAKE_TOOLCHAIN_FILE=../arm-gnueabi.toolchain.cmake ../../..
  7. Build project (this will take a while)
    make
Disclaimer* I haven't actually tried this.
__________________
"You're a gentleman," they used to say to him. "You shouldn't have gone murdering people with a hatchet; that's no occupation for a gentleman."