https://github.com/sthysel/opencv-lab
Playing with OpenCV 4
https://github.com/sthysel/opencv-lab
graphics lab opencv play
Last synced: 3 months ago
JSON representation
Playing with OpenCV 4
- Host: GitHub
- URL: https://github.com/sthysel/opencv-lab
- Owner: sthysel
- Created: 2019-02-05T13:39:04.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-02-05T14:30:53.000Z (over 6 years ago)
- Last Synced: 2025-03-11T04:59:45.929Z (7 months ago)
- Topics: graphics, lab, opencv, play
- Language: Python
- Homepage:
- Size: 1.71 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Playing with OpenCV

# Install OpenCV 4.0.1
Build from source to switch things on.
Get sources and prep build folders
```
$ mkdir ~/opencv
$ git clone -b 4.0.1 https://github.com/opencv/opencv.git opencv
$ cd opencv
$ git clone https://github.com/opencv/opencv_contrib.git opencv_contrib
$ mkdir release
$ cd release
```make a virtualenv and drop lib in there
```
$ mkvirtualenv opencv-play
$ export VENV=~/.virtualenvs/opencv-play
$ export ARCH_BIN=
$ cmake -DCMAKE_INSTALL_PREFIX=${VENV} \
-DCPYTHON_EXECUTABLE=${VENV}/bin/python \
-DCPYTHON_PACKAGES_PATH=${VENV}/lib/python3.7/site-packages \
-DCMAKE_BUILD_TYPE=RELEASE \
-DINSTALL_PYTHON_EXAMPLES=ON \
-DINSTALL_C_EXAMPLES=OFF \
-DOPENCV_EXTRA_MODULES_PATH=~/opencv/opencv_contrib/modules \
-DBUILD_PYTHON_SUPPORT=ON \
-DWITH_XINE=ON -D WITH_OPENGL=ON \
-DWITH_TBB=ON \
-DWITH_EIGEN=ON \
-DBUILD_EXAMPLES=ON \
-DBUILD_NEW_PYTHON_SUPPORT=ON \
-DWITH_V4L=ON \
-DBUILD_EXAMPLES=ON \
-DWITH_CUDA=ON \
-DCUDA_ARCH_BIN=${ARCH_BIN} \
-DCUDA_ARCH_PTX="" \
-DCUDA_FAST_MATH=ON \
-DWITH_CUBLAS=ON \
../
```Build quicker
```
$ make -j4
$ make install
```# Resources
- https://docs.opencv.org/4.0.1/