Check out OpenVX Tutorial events in Silicon Valley.
Setup Your Computer Before Starting the Tutorial
This tutorial makes use of VirtualBox software and a virtual machine prepared with the course material.
- Choose a laptop with a recent 64-bit OS.
- Download and install a recent VirtualBox from https://www.virtualbox.org/wiki/Downloads.
- Download virtual machine "Ubuntu-64-OpenVX.zip" (2 GB) from https://goo.gl/I89vJW and extract files into a local folder.
- Run VirtualBox and add "Ubuntu-64-OpenVX" virtual machine [Machine -> Add] from the local folder.
- If you cannot install 64-bit VM, even though you have a 64-bit Windows, you need to enable virtualization in the BIOS.
- In the Security section, enable Virtualization Technology and VT-d Feature.
- On Windows 8.1, you also need to turn Hyper-V off (search for Turn Windows features on or off).
- Start the "Ubuntu-64-OpenVX" virtual machine ([username: openvx][password: openvx]).
- Run "Qt Creator" (click Qt icon on left) and open exercises project.
- Open Project:
- click "Configure Project" to open CMake Wizard
- click "Run CMake" and "Finish"
- Select exercise1 as active sub-project.
- click "Open Build and Run Kit Selector" under the "Build" menu
- select Run "exercise1" under the Build "Default" and press ESCAPE
- expand "exercise1" folder and click "exercise1.cpp"
- you are going to modify this file during the first practice session
- Build the project and run.
- click "Run" under the "Build" menu (or use keyboard shortcut Ctrl+R)
- you should see video in a window (you can move the window for better view)
- press ESCAPE or 'q' to exit the app
Familiarie yourself with OpenVX specification [html|pdf].
Overview of Tutorial Exercises
It is best to start doing these exercises after the tutorial presentations.
In the VM, all the tutorial exercises are kept in
tutorial_exercises/CMakeLists.txt includes all the exercises as separate
All of the exercise folders contain only one .cpp file with main()
as the entry point.
All the include files are kept in the
tutorial_exercises sub-directory contains four exercises:
exercise1: framework basics, import media, run a keypoint detector
exercise2: graph concepts, keypoint tracking
exercise3: user kernels, build a wrapper kernel to OpenCV function
exercise4: user kernels, build a keypoint tracker
There are additional folders with full solutions:
solution_exerciseN: complete solution of
exerciseN. Just for reference.
Each exercise requires you to modify
Here are few helpful instructions:
- Look for
TODO keyword in
exerciseN/exerciseN.cpp comments for instructions
for code snippets that you need to create.
- The steps are numbered, do them in that order.
- All header files are kept in
To open a header file, move the cursor to corresponding
exerciseN/exerciseN.cpp and press F2.
"opencv_camera_display.h" is a wrapper that imports media and
displays results using OpenCV library.
#define DEFAULT_WAITKEY_DELAY 1 is used to specify wait time in milliseconds after each frame processing; to slowdown use larger numbers; or use 0 to wait for a key after each frame.
"VX/vxu.h" files are part of OpenVX header files
downloaded from https://www.khronos.org/registry/vx/
- To view the definition of any OpenVX API or data type, simply move the
cursor to the name and press F2.
- The video sequence PETS09-S1-L1-View001.avi will be in
- All the exercises in this tutorial use this video sequence as input.
- Optionally, you can also specify you own video sequence on command-line as an argument.
- Once you finish all the exercises, try using Release Build to see better performance.