Advertisement
Guest User

Untitled

a guest
Mar 29th, 2019
785
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. apt-get install build-essential cmake pkg-config
  2. apt-get install libjpeg-dev libtiff-dev
  3.  
  4. apt-get install libjasper-dev libpng12-dev (Not Found)
  5.  
  6. apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev
  7. apt-get install libxvidcore-dev libx264-dev
  8. apt-get install libgtk2.0-dev libgtk-3-dev
  9. apt-get install libatlas-base-dev gfortran
  10.  
  11. apt-get install python3-dev
  12. apt-get install python3-pip
  13.  
  14.  
  15. wget -O opencv.zip https://github.com/opencv/opencv/archive/4.0.0.zip
  16. wget -O opencv_contrib.zip https://github.com/opencv/opencv_contrib/archive/4.0.0.zip
  17. unzip opencv.zip
  18. unzip opencv_contrib.zip
  19. mv opencv_contrib-4.0.0 opencv_contrib
  20. mv opencv-4.0.0 opencv
  21.  
  22. sudo pip3 install numpy scipy
  23.  
  24. cd ~/opencv/
  25. mkdir build
  26. cd build
  27.  
  28. cmake -D CMAKE_BUILD_TYPE=RELEASE \
  29. -D CMAKE_INSTALL_PREFIX=/usr/local \
  30. -D INSTALL_PYTHON_EXAMPLES=ON \
  31. -D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules \
  32. -D ENABLE_NEON=ON \
  33. -D ENABLE_VFPV3=ON \
  34. -D WITH_FFMPEG=ON \
  35. -D WITH_GSTREAMER=ON \
  36.     -D OPENCV_ENABLE_NONFREE=ON \
  37. -D BUILD_EXAMPLES=ON ..
  38.  
  39. make -j4
  40.  
  41. sudo make install
  42. sudo ldconfig
  43. sudo apt-get update
  44.  
  45.  
  46. python
  47. import cv2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement