Update README.md

pull/3471/head
Amir Hassan 2 years ago committed by GitHub
parent 8be9e2d2b5
commit 66ce9c98f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 79
      README.md

@ -25,84 +25,7 @@ Please note that the following online demos are slower and/or have less features
* https://viel-zu.org/opencv/beauty
# Documentation
OpenCV module documentation with tutorials and samples is available [here](https://viel-zu.org/opencv/doxygen/html/dc/d7b/viz2d.html)
# Build
## Requirements
* C++20 (at the moment)
* OpenGL 4/OpenGL ES 3.0
## Optional requirements
* Support for OpenCL 1.2
* Support for cl_khr_gl_sharing and cl_intel_va_api_media_sharing OpenCL extensions.
* If you want cl-gl sharing on a recent Intel Platform (Gen8 - Gen12) you currently **need to install** [compute-runtime](https://github.com/intel/compute-runtime) from source and [my OpenCV fork](https://github.com/kallaballa/opencv)
## Dependencies
* [OpenCV 4.x](https://github.com/opencv/opencv)
* EGL
* GLEW
* GLFW3
* [nanovg](https://github.com/inniyah/nanovg)
* [nanogui](https://github.com/mitsuba-renderer/nanogui)
## Instructions for Ubuntu 22.04.2 LTS
You need to build OpenCV with Viz2D
### Install required packages
```bash
apt install vainfo clinfo libqt5opengl5-dev freeglut3-dev ocl-icd-opencl-dev libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libpostproc-dev libswresample-dev libswscale-dev libglfw3-dev libstb-dev libglew-dev cmake make git-core build-essential opencl-clhpp-headers pkg-config zlib1g-dev doxygen libxinerama-dev libxcursor-dev libxi-dev libva-dev
```
### Build OpenCV with Viz2D using C++20
```bash
git clone --branch 4.x https://github.com/opencv/opencv.git
git clone https://github.com/kallaballa/Viz2D.git
mkdir opencv/build
cd opencv/build
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_opencv_viz2d=ON -DBUILD_opencv_python_tests=OFF -DBUILD_opencv_js_bindings_generator=OFF -DBUILD_opencv_python_bindings_generator=OFF -DBUILD_opencv_python3=OFF -DOPENCV_ENABLE_GLX=ON -DOPENCV_FFMPEG_ENABLE_LIBAVDEVICE=ON -DWITH_OPENGL=ON -DWITH_QT=ON -DWITH_FFMPEG=ON -DOPENCV_FFMPEG_SKIP_BUILD_CHECK=ON -DWITH_VA=ON -DWITH_VA_INTEL=ON -DBUILD_PERF_TESTS=OFF -DBUILD_TESTS=OFF -DBUILD_EXAMPLES=OFF -DOPENCV_EXTRA_MODULES_PATH=../../Viz2D/modules/ ..
make -j8
sudo make install
```
### Build the samples
```bash
cd Viz2D/modules/viz2d/samples/cpp
make -j
```
### Download the example file
```bash
wget -O bunny.webm https://upload.wikimedia.org/wikipedia/commons/transcoded/f/f3/Big_Buck_Bunny_first_23_seconds_1080p.ogv/Big_Buck_Bunny_first_23_seconds_1080p.ogv.1080p.vp9.webm
```
### Run the demos
```bash
Viz2D/modules/viz2d/samples/cpp/tetra/tetra-demo
```
```bash
Viz2D/modules/viz2d/samples/cpp/video/video-demo bunny.webm
```
```bash
Viz2D/modules/viz2d/samples/cpp/shader/shader-demo bunny.webm
```
```bash
Viz2D/modules/viz2d/samples/cpp/nanovg/nanovg-demo bunny.webm
```
```bash
Viz2D/modules/viz2d/samples/cpp/font/font-demo
```
```bash
Viz2D/modules/viz2d/samples/cpp/optflow/optflow-demo bunny.webm
```
```bash
Viz2D/modules/viz2d/samples/cpp/pedestrian/pedestrian-demo bunny.webm
```
```bash
Viz2D/modules/viz2d/samples/cpp/beauty/beauty-demo bunny.webm
```
OpenCV module documentation with tutorials, samples and build instructions is available [here](https://viel-zu.org/opencv/doxygen/html/dc/d7b/viz2d.html)
# Attribution
* The author of the bunny video is **(c) copyright Blender Foundation | www.bigbuckbunny.org**.

Loading…
Cancel
Save