Skip to content

Instantly share code, notes, and snippets.

@vfdev-5
Last active March 17, 2017 03:10
Show Gist options
  • Select an option

  • Save vfdev-5/83b5e9f2b0ca2199548a57821d13dfde to your computer and use it in GitHub Desktop.

Select an option

Save vfdev-5/83b5e9f2b0ca2199548a57821d13dfde to your computer and use it in GitHub Desktop.
Colfax Cluster notes

Install OpenCV from sources with python wrapper

Python3 wrapper

git clone https://github.com/opencv/opencv.git opencv_source
mkdir build_opencv; cd build_opencv
cmake -DCMAKE_INSTALL_PREFIX=../opencv -DPYTHON_DEFAULT_EXECUTABLE=/opt/intel/intelpython35/bin/python3 -DWITH_VA_INTEL=ON -DBUILD_opencv_python3=ON -DPYTHON3_INCLUDE_PATH=/opt/intel/intelpython35/include/python3.5m ../opencv_source 
make install -j8

Once built without error setup PYTHONPATH

export  PYTHONPATH=$PYTHONPATH:~/opencv/lib/python3.5/site-packages/

Python2 wrapper

git clone https://github.com/opencv/opencv.git opencv_source
mkdir build_opencv; cd build_opencv
cmake -DCMAKE_INSTALL_PREFIX=../opencv -DPYTHON_DEFAULT_EXECUTABLE=/opt/intel/intelpython27/bin/python2 -DWITH_VA_INTEL=ON -DBUILD_opencv_python2=ON -DPYTHON2_INCLUDE_PATH=/opt/intel/intelpython27/include/python2.7 ../opencv_source 
make install -j8

Once built without error setup PYTHONPATH

export  PYTHONPATH=$PYTHONPATH:~/opencv/lib/python2.7/site-packages/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment