Skip to content

Instantly share code, notes, and snippets.

@chintak
Forked from tkdave/gist:4150916
Last active October 31, 2016 14:56
Show Gist options
  • Select an option

  • Save chintak/0b3dfd0d162b55a973cc to your computer and use it in GitHub Desktop.

Select an option

Save chintak/0b3dfd0d162b55a973cc to your computer and use it in GitHub Desktop.

Revisions

  1. chintak revised this gist Nov 24, 2014. 1 changed file with 20 additions and 1 deletion.
    21 changes: 20 additions & 1 deletion opencv_OSX.sh
    Original file line number Diff line number Diff line change
    @@ -57,4 +57,23 @@ cmake -D CMAKE_BUILD_TYPE=DEBUG \
    ..

    make -j8
    make install
    make install

    # cmake -D CMAKE_BUILD_TYPE=DEBUG \
    # -D WITH_TBB=OFF \
    # -D WITH_OPENGL=ON \
    # -D WITH_OPENCL=OFF \
    # -D ENABLE_PROFILING=ON \
    # -D ENABLE_PRECOMPILED_HEADERS=ON \
    # -D ENABLE_COVERAGE=ON \
    # -D ENABLE_FAST_MATH=ON \
    # -D PYTHON2_EXECUTABLE=$VIRTUAL_ENV/bin/python \
    # -D PYTHON2_PACKAGES_PATH=$VIRTUAL_ENV/lib/python2.7/site-packages \
    # -D INSTALL_PYTHON_EXAMPLES=ON \
    # -D PYTHON2_INCLUDE_DIR=/usr/local/Cellar/python/2.7.8/Frameworks/Python.framework/Headers \
    # -D PYTHON2_LIBRARY=/usr/local/Cellar/python/2.7.8/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib \
    # -D PYTHON3_EXECUTABLE=$VIRTUAL_ENV/bin/python3 \
    # -D PYTHON3_PACKAGES_PATH=$VIRTUAL_ENV/lib/python3.4/site-packages \
    # -D PYTHON3_INCLUDE_DIR=/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Headers \
    # -D PYTHON3_LIBRARY=/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/libpython3.4.dylib \
    # ..
  2. chintak revised this gist Nov 24, 2014. 1 changed file with 6 additions and 2 deletions.
    8 changes: 6 additions & 2 deletions opencv_OSX.sh
    Original file line number Diff line number Diff line change
    @@ -14,8 +14,12 @@ workon opencv

    # install numpy
    pip install numpy
    pip install scipy matplotlib
    pip install nose ipython sphinx cython pygments
    pip install scipy
    pip install matplotlib
    pip install ipython
    pip install sphinx
    pip install cython
    pip install pygments

    # requirements for opencv
    brew install lame jpeg libpng cmake pkg-config eigen libtiff jasper ffmpeg
  3. chintak revised this gist Nov 24, 2014. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions opencv_OSX.sh
    Original file line number Diff line number Diff line change
    @@ -14,6 +14,8 @@ workon opencv

    # install numpy
    pip install numpy
    pip install scipy matplotlib
    pip install nose ipython sphinx cython pygments

    # requirements for opencv
    brew install lame jpeg libpng cmake pkg-config eigen libtiff jasper ffmpeg
  4. chintak renamed this gist Nov 24, 2014. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  5. chintak revised this gist Nov 24, 2014. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions opencv_OSX
    Original file line number Diff line number Diff line change
    @@ -46,8 +46,8 @@ cmake -D CMAKE_BUILD_TYPE=DEBUG \
    -D PYTHON_EXECUTABLE=$VIRTUAL_ENV/bin/python \
    -D PYTHON_PACKAGES_PATH=$VIRTUAL_ENV/lib/python2.7/site-packages \
    -D INSTALL_PYTHON_EXAMPLES=ON \
    -D PYTHON_INCLUDE_DIR=/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Headers \
    -D PYTHON_LIBRARY=/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib \
    -D PYTHON_INCLUDE_DIR=/usr/local/Cellar/python/2.7.8/Frameworks/Python.framework/Headers \
    -D PYTHON_LIBRARY=/usr/local/Cellar/python/2.7.8/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib \
    ..

    make -j8
  6. chintak revised this gist Nov 24, 2014. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions opencv_OSX
    Original file line number Diff line number Diff line change
    @@ -46,8 +46,8 @@ cmake -D CMAKE_BUILD_TYPE=DEBUG \
    -D PYTHON_EXECUTABLE=$VIRTUAL_ENV/bin/python \
    -D PYTHON_PACKAGES_PATH=$VIRTUAL_ENV/lib/python2.7/site-packages \
    -D INSTALL_PYTHON_EXAMPLES=ON \
    -D PYTHON_INCLUDE_DIR=/usr/local/Cellar/python/2.7.6_1/Frameworks/Python.framework/Headers \
    -D PYTHON_LIBRARY=/usr/local/Cellar/python/2.7.6_1/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib \
    -D PYTHON_INCLUDE_DIR=/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Headers \
    -D PYTHON_LIBRARY=/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib \
    ..

    make -j8
  7. chintak revised this gist Nov 24, 2014. 1 changed file with 4 additions and 1 deletion.
    5 changes: 4 additions & 1 deletion opencv_OSX
    Original file line number Diff line number Diff line change
    @@ -41,11 +41,14 @@ brew install tbb
    # Download and cd into the latest OpenCV version
    mkdir release
    cd release
    cmake -D PYTHON_EXECUTABLE=$VIRTUAL_ENV/bin/python \

    cmake -D CMAKE_BUILD_TYPE=DEBUG \
    -D PYTHON_EXECUTABLE=$VIRTUAL_ENV/bin/python \
    -D PYTHON_PACKAGES_PATH=$VIRTUAL_ENV/lib/python2.7/site-packages \
    -D INSTALL_PYTHON_EXAMPLES=ON \
    -D PYTHON_INCLUDE_DIR=/usr/local/Cellar/python/2.7.6_1/Frameworks/Python.framework/Headers \
    -D PYTHON_LIBRARY=/usr/local/Cellar/python/2.7.6_1/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib \
    ..

    make -j8
    make install
  8. chintak renamed this gist Nov 24, 2014. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions gistfile1.sh → opencv_OSX
    Original file line number Diff line number Diff line change
    @@ -16,8 +16,8 @@ workon opencv
    pip install numpy

    # requirements for opencv
    brew install lame jpeg png cmake pkg-config eigen libtiff jasper ffmpeg
    brew link jpeg lib png
    brew install lame jpeg libpng cmake pkg-config eigen libtiff jasper ffmpeg
    brew link jpeg libpng

    # Install Xcode 4.6.3 in order to get llvm-gcc working. Not provided with Xcode 5+.

    @@ -41,8 +41,8 @@ brew install tbb
    # Download and cd into the latest OpenCV version
    mkdir release
    cd release
    cmake -D PYTHON_EXECUTABLE=$WORKON_HOME/opencv2/bin/python \
    -D PYTHON_PACKAGES_PATH=$WORKON_HOME/opencv2/lib/python2.7/site-packages \
    cmake -D PYTHON_EXECUTABLE=$VIRTUAL_ENV/bin/python \
    -D PYTHON_PACKAGES_PATH=$VIRTUAL_ENV/lib/python2.7/site-packages \
    -D INSTALL_PYTHON_EXAMPLES=ON \
    -D PYTHON_INCLUDE_DIR=/usr/local/Cellar/python/2.7.6_1/Frameworks/Python.framework/Headers \
    -D PYTHON_LIBRARY=/usr/local/Cellar/python/2.7.6_1/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib \
  9. chintak revised this gist Aug 5, 2014. No changes.
  10. chintak revised this gist May 17, 2014. 1 changed file with 11 additions and 7 deletions.
    18 changes: 11 additions & 7 deletions gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -19,6 +19,8 @@ pip install numpy
    brew install lame jpeg png cmake pkg-config eigen libtiff jasper ffmpeg
    brew link jpeg lib png

    # Install Xcode 4.6.3 in order to get llvm-gcc working. Not provided with Xcode 5+.

    # XX SHA1 mismatch on tbb
    mate /usr/local/Library/Formula/tbb.rb

    @@ -29,19 +31,21 @@ mate /usr/local/Library/Formula/tbb.rb
    brew install tbb

    # download OpenCV
    wget http://downloads.sourceforge.net/project/opencvlibrary/opencv-unix/2.4.3/OpenCV-2.4.3.tar.bz2?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fopencvlibrary%2Ffiles%2Fopencv-unix%2F2.4.3%2F&ts=1353964941&use_mirror=iweb
    # wget http://downloads.sourceforge.net/project/opencvlibrary/opencv-unix/2.4.3/OpenCV-2.4.3.tar.bz2?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fopencvlibrary%2Ffiles%2Fopencv-unix%2F2.4.3%2F&ts=1353964941&use_mirror=iweb

    # unzip
    tar xvfJ OpenCV-2.4.3.tar.bz2
    # tar xvfJ OpenCV-2.4.3.tar.bz2

    # cd OpenCV-2.4.3/

    cd OpenCV-2.4.3/
    # Download and cd into the latest OpenCV version
    mkdir release
    cd release
    cmake -D PYTHON_EXECUTABLE=$WORKON_HOME/opencv/bin/python \
    -D PYTHON_PACKAGES_PATH=$WORKON_HOME/opencv/lib/python2.7/site-packages \
    cmake -D PYTHON_EXECUTABLE=$WORKON_HOME/opencv2/bin/python \
    -D PYTHON_PACKAGES_PATH=$WORKON_HOME/opencv2/lib/python2.7/site-packages \
    -D INSTALL_PYTHON_EXAMPLES=ON \
    -D PYTHON_INCLUDE_DIR=/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Headers \
    -D PYTHON_LIBRARY=/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib \
    -D PYTHON_INCLUDE_DIR=/usr/local/Cellar/python/2.7.6_1/Frameworks/Python.framework/Headers \
    -D PYTHON_LIBRARY=/usr/local/Cellar/python/2.7.6_1/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib \
    ..
    make -j8
    make install
  11. @tkdave tkdave created this gist Nov 26, 2012.
    47 changes: 47 additions & 0 deletions gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,47 @@
    # Installing OpenCV python libs on mac to work with virtualenv
    # OpenCV 2.4.3
    # Python 2.7.3 installed with brew

    # assuming you have virtualenv, pip, and python installed via brew
    # assuming $WORKON_HOME is set to something like ~/.virtualenvs

    # using homebrew - make sure we're current
    brew update

    # setup virtual env
    mkvirtualenv opencv
    workon opencv

    # install numpy
    pip install numpy

    # requirements for opencv
    brew install lame jpeg png cmake pkg-config eigen libtiff jasper ffmpeg
    brew link jpeg lib png

    # XX SHA1 mismatch on tbb
    mate /usr/local/Library/Formula/tbb.rb

    #Update Lines 5 and 6 to latest source and sha1
    url 'http://threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb41_20121112oss_src.tgz'
    sha1 '752943b78d7a6d3a764feb1bbd7df6c230170cf1'

    brew install tbb

    # download OpenCV
    wget http://downloads.sourceforge.net/project/opencvlibrary/opencv-unix/2.4.3/OpenCV-2.4.3.tar.bz2?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fopencvlibrary%2Ffiles%2Fopencv-unix%2F2.4.3%2F&ts=1353964941&use_mirror=iweb

    # unzip
    tar xvfJ OpenCV-2.4.3.tar.bz2

    cd OpenCV-2.4.3/
    mkdir release
    cd release
    cmake -D PYTHON_EXECUTABLE=$WORKON_HOME/opencv/bin/python \
    -D PYTHON_PACKAGES_PATH=$WORKON_HOME/opencv/lib/python2.7/site-packages \
    -D INSTALL_PYTHON_EXAMPLES=ON \
    -D PYTHON_INCLUDE_DIR=/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Headers \
    -D PYTHON_LIBRARY=/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib \
    ..
    make -j8
    make install