updated documentation

pull/3471/head
kallaballa 2 years ago
parent 489e4ca358
commit 99da7b5c5c
  1. 4
      modules/viz2d/samples/cpp/display_image.cpp
  2. 4
      modules/viz2d/samples/cpp/display_image_fb.cpp
  3. 3
      modules/viz2d/samples/cpp/font_rendering.cpp
  4. 3
      modules/viz2d/samples/cpp/vector_graphics.cpp
  5. 3
      modules/viz2d/samples/cpp/vector_graphics_and_fb.cpp
  6. 23
      modules/viz2d/tutorials/00-intro.markdown
  7. 2
      modules/viz2d/tutorials/01-dislay_image.markdown
  8. 2
      modules/viz2d/tutorials/02-vector_graphics.markdown
  9. 2
      modules/viz2d/tutorials/03-render_opengl.markdown
  10. 2
      modules/viz2d/tutorials/04-font_rendering.markdown
  11. 2
      modules/viz2d/tutorials/05-video_editing.markdown
  12. 2
      modules/viz2d/tutorials/06-font_with_gui.markdown
  13. 2
      modules/viz2d/tutorials/10-tetra.markdown
  14. 2
      modules/viz2d/tutorials/11-video.markdown
  15. 2
      modules/viz2d/tutorials/12-nanovg.markdown
  16. 2
      modules/viz2d/tutorials/13-shader.markdown
  17. 2
      modules/viz2d/tutorials/14-font.markdown
  18. 2
      modules/viz2d/tutorials/15-pedestrian.markdown
  19. 2
      modules/viz2d/tutorials/16-optflow.markdown
  20. 2
      modules/viz2d/tutorials/17-beauty.markdown

@ -14,7 +14,7 @@ int main() {
Mat image = imread(samples::findFile("lena.jpg"));
//Feeds the image to the video pipeline
v2d->feed(image);
//Display the framebuffer in the native window
while(v2d->display());
//Display the framebuffer in the native window in an endless loop
v2d->run(v2d->display);
}

@ -19,7 +19,7 @@ int main() {
//Color convert the resized UMat. The framebuffer has alpha.
cvtColor(resized, framebuffer, COLOR_RGB2BGRA);
});
//Display the framebuffer in the native window
while(v2d->display());
//Display the framebuffer in the native window in an endless loop
v2d->run(v2d->display);
}

@ -24,6 +24,7 @@ int main(int argc, char** argv) {
text(WIDTH / 2.0, HEIGHT / 2.0, hw.c_str(), hw.c_str() + hw.size());
});
while(v2d->display());
//Display the framebuffer in the native window in an endless loop
v2d->run(v2d->display);
}

@ -24,6 +24,7 @@ int main(int argc, char** argv) {
stroke();
});
while(v2d->display());
//Display the framebuffer in the native window in an endless loop
v2d->run(v2d->display);
}

@ -28,6 +28,7 @@ int main(int argc, char** argv) {
//Heavily blurs the crosshair using a cheap boxFilter
boxFilter(framebuffer, framebuffer, -1, Size(15, 15), Point(-1,-1), true, BORDER_REPLICATE);
});
while(v2d->display());
//Display the framebuffer in the native window in an endless loop
v2d->run(v2d->display);
}

@ -2,20 +2,25 @@
[TOC]
| | |
| -: | :- |
| Original author | Amir Hassan (kallaballa) <amir@viel-zu.org> |
| Compatibility | OpenCV >= 4.7 |
# What is Viz2D?
Viz2D offers a way of writing graphical (on- and offscreen) high performance applications with OpenCV. It is light-weight and unencumbered by QT or GTK licenses. It features vector graphics using [NanoVG](https://github.com/inniyah/nanovg) a GUI based on [NanoGUI](https://github.com/mitsuba-renderer/nanogui) and (on supported systems) OpenCL/OpenGL and OpenCL/VAAPI interoperability. It should be included in [OpenCV-contrib](https://github.com/opencv/opencv_contrib) once it is ready.
# Why Viz2D?
Please refer to the following online demos to see at a glance what it can do for you.
* OpenGL: Easy access to OpenGL.
* GUI: Simple yet powerful user interfaces through NanoGUI.
* Vector graphics: Elegant and fast vector graphics through NanoVG.
* Font rendering: Loading of TTF-fonts and sophisticated rendering options.
* Video pipeline: Through a simple Source/Sink system videos can be displayed, edited and saved.
* Hardware acceleration: Automatic hardware acceleration usage where possible. (e.g. cl-gl sharing and VAAPI). Actually it is possible to write programs that run almost entirely on the GPU, given driver-features are available.
* No more highgui with it's heavy dependencies, licenses and limitations.
* WebAssembly support.
* **OpenGL**: Easy access to OpenGL.
* **GUI**: Simple yet powerful user interfaces through NanoGUI.
* **Vector graphics**: Elegant and fast vector graphics through NanoVG.
* **Font rendering**: Loading of TTF-fonts and sophisticated rendering options.
* **Video pipeline**: Through a simple Source/Sink system videos can be displayed, edited and saved.
* **Hardware acceleration**: Automatic hardware acceleration usage where possible. (e.g. CL-GL sharing and VAAPI). Actually it is possible to write programs that run almost entirely on the GPU, given driver-features are available.
* **No more highgui** with it's heavy dependencies, licenses and limitations.
* **WebAssembly support**.
# Online Demos
@ -49,7 +54,7 @@ v2d->gl([](const Size sz) {
# 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)
* 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)

@ -5,7 +5,7 @@
| | |
| -: | :- |
| Original author | Amir Hassan |
| Original author | Amir Hassan (kallaballa) <amir@viel-zu.org> |
| Compatibility | OpenCV >= 4.7 |
## Using the video pipeline

@ -5,7 +5,7 @@
| | |
| -: | :- |
| Original author | Amir Hassan |
| Original author | Amir Hassan (kallaballa) <amir@viel-zu.org> |
| Compatibility | OpenCV >= 4.7 |
## Vector graphics

@ -5,7 +5,7 @@
| | |
| -: | :- |
| Original author | Amir Hassan |
| Original author | Amir Hassan (kallaballa) <amir@viel-zu.org> |
| Compatibility | OpenCV >= 4.7 |
## Render a rotating tetrahedron

@ -5,7 +5,7 @@
| | |
| -: | :- |
| Original author | Amir Hassan |
| Original author | Amir Hassan (kallaballa) <amir@viel-zu.org> |
| Compatibility | OpenCV >= 4.7 |
## Render Hello World

@ -5,7 +5,7 @@
| | |
| -: | :- |
| Original author | Amir Hassan |
| Original author | Amir Hassan (kallaballa) <amir@viel-zu.org> |
| Compatibility | OpenCV >= 4.7 |
## Render text on top of a video

@ -4,7 +4,7 @@
| | |
| -: | :- |
| Original author | Amir Hassan |
| Original author | Amir Hassan (kallaballa) <amir@viel-zu.org> |
| Compatibility | OpenCV >= 4.7 |
## Font rendering with form based GUI

@ -5,7 +5,7 @@
| | |
| -: | :- |
| Original author | Amir Hassan |
| Original author | Amir Hassan (kallaballa) <amir@viel-zu.org> |
| Compatibility | OpenCV >= 4.7 |
Renders a rainbow tetrahedron on blue background using OpenGL, applies a glow effect using OpenCV (OpenCL) and encodes on the GPU (VAAPI).

@ -5,7 +5,7 @@
| | |
| -: | :- |
| Original author | Amir Hassan |
| Original author | Amir Hassan (kallaballa) <amir@viel-zu.org> |
| Compatibility | OpenCV >= 4.7 |
Renders a rainbow tetrahedron on top of a input-video using OpenGL, applies a glow effect using OpenCV (OpenCL) and decodes/encodes on the GPU (VAAPI).

@ -5,7 +5,7 @@
| | |
| -: | :- |
| Original author | Amir Hassan |
| Original author | Amir Hassan (kallaballa) <amir@viel-zu.org> |
| Compatibility | OpenCV >= 4.7 |
Renders a color wheel on top of an input-video using nanovg (OpenGL), does colorspace conversions using OpenCV (OpenCL) and decodes/encodes on the GPU (VAAPI).

@ -5,7 +5,7 @@
| | |
| -: | :- |
| Original author | Amir Hassan |
| Original author | Amir Hassan (kallaballa) <amir@viel-zu.org> |
| Compatibility | OpenCV >= 4.7 |
Renders a mandelbrot fractal zoom. Uses shaders, OpenCL and VAAPI together.

@ -5,7 +5,7 @@
| | |
| -: | :- |
| Original author | Amir Hassan |
| Original author | Amir Hassan (kallaballa) <amir@viel-zu.org> |
| Compatibility | OpenCV >= 4.7 |
Renders a Star Wars like text crawl using nanovg (OpenGL), uses OpenCV (OpenCL) for a pseudo 3D effect and encodes on the GPU (VAAPI).

@ -5,7 +5,7 @@
| | |
| -: | :- |
| Original author | Amir Hassan |
| Original author | Amir Hassan (kallaballa) <amir@viel-zu.org> |
| Compatibility | OpenCV >= 4.7 |
Pedestrian detection using HOG with a linear SVM, non-maximal suppression and tracking using KCF. Uses nanovg for rendering (OpenGL), detects using a linear SVM (OpenCV/OpenCL), filters resuls using NMS (CPU) and tracks using KCF (CPU). Decodes/encodes on the GPU (VAAPI).

@ -5,7 +5,7 @@
| | |
| -: | :- |
| Original author | Amir Hassan |
| Original author | Amir Hassan (kallaballa) <amir@viel-zu.org> |
| Compatibility | OpenCV >= 4.7 |
Optical flow visualization on top of a video. Uses background subtraction (OpenCV/OpenCL) to isolate areas with motion, detects features to track (OpenCV/OpenCL), calculates the optical flow (OpenCV/OpenCL), uses nanovg for rendering (OpenGL) and post-processes the video (OpenCL). Decodes/encodes on the GPU (VAAPI).

@ -4,7 +4,7 @@
| | |
| -: | :- |
| Original author | Amir Hassan |
| Original author | Amir Hassan (kallaballa) <amir@viel-zu.org> |
| Compatibility | OpenCV >= 4.7 |
Face beautification using face landmark detection (OpenCV/OpenCL), nanovg (OpenGL) for drawing masks and multi-band blending (CPU) to put it all together.

Loading…
Cancel
Save