![]() |
University of Murcia, Spain ![]() |
Introduction to QVisionWhat is QVision?QVision is a development framework for fast prototyping of multithreaded real time computer vision and image processing applications. As such, it is mainly intended to be a tool for researchers, who want to rapidly implement and test new ideas without investing too much time in the gory details of low-level programming. However, preserving efficiency in the resulting applications is one of its main design goals. Thus, the framework offers versatile design tools to rapidly create fully functional and highly efficient applications at a low programming cost.The library is continuously evolving, and is developed using C++ and the well known Qt library. Currently, it is developed and mantained to work only under Linux, but in a future it could also be extended to work under other operating systems -such as Windows and MacOS- taking advantage of the portability of the underlying Qt library. These are some of the main features of the application development cycle using the QVision framework: Easy to use block oriented application designThe developer/researcher can code simple, independent, and well encapsulated data processing blocks, and compose them with video input, image output or data plotting blocks, to create new computer vision applications. This approach encourages reusability and modularity, easing the development of fast and reliable applications, with a powerful and versatile user interface, while reducing significatively the programming effort to create them.Interestingly, this modularity also leads to a very easy to use parallel programming paradigm. The modular design can be used to divide an application or algorithm into a set of tasks or processing stages, which can be asigned each one of them to a different thread, obtaining parallel performance gain in modern multicore processors. Section Block programming of this documentation reviews that block oriented programming paradigm in detail. Versatile video input functionalityBasing its video input system on the well known MPlayer multimedia player, the QVision offers functionality to read image frames from a very wide and heterogeneous set of video sources:
That functionality is provided in the framework by a common "virtual camera" object class named QVMPlayerCamera, that encapsulates and homogenizes the different underlying video sources under a common programming interface. That class creates camera objects which use the MPlayer application to read from an specified video source. In fact, a given application which reads from, say, a webcam, does not even have to be recompiled to be tested with another very different kind of video input, say, a video file or a digital TV card. Of course, multiple simultaneous sources (for example, for multiple camera applications) are also adequately supported. Efficient performance functionalityAs we already stated, efficiency is one of the main design goals of the framework. The image processing and scientific numeric functionality of QVision is built upon highly efficient libraries such as the Intel Performance Primitives, and the Gnu Scientific Library, making the QVision perfectly adequate for real-time application prototyping.The QVision contains wrapper functions and classes to offer that functionality under an homogeneous and object oriented programming interface. For example, to create image and matrix objects (wrapping IPP image data pointers and specifications and GSL matrices, respectively), the framework offers the well documented and easy to use classes QVImage and QVMatrix. We have also created many other wrapper classes which use underlying GSL functionality, such as QVVector, QVQuaternion and QVTensor. The documentation for the module Image processing describes the image processing functionality offered by the QVision. This module implements a lot of image filtering functions, arithmetic and morphological operations, several commonly used feature extraction algorithms, and the like. It also includes the submodule IPP wrapper functions, which contains a comprehensive set of wrapper functions to use QVImage objects and other object oriented data types as arguments to IPP functions. For the scientific computations, the module Math extensions contains all the wrapper functionality offered by the QVision regarding matrix, vector and algebraic operations based on the GSL, Blas and Lapack libraries. Versatile user interfaceThe framework includes a powerful set of graphical user interface widgets, which can be straightforwardly included in any QVision application, at a very low programming cost overhead (in just a few lines of code). The developer can use them to offer user control on the input video sources sequences at execution time; even the execution flow of the different image processing algorithms implemented in the different threads which compose the application, can be controlled by the user at execution time.This is a snapshot of a typical application developed under the QVision framework, running in six different computation threads (plus the independent GUI thread):
![]() The final user of the application can stop, resume and execute step by step the application while it reads input frames from a given (live or recorded) video source. He or she can also control the execution of the algorithms, stopping and resuming them just like he can do with the cameras, while modifying the values of the desired parameters. Both features can be used to debug and test the algorithms in different conditions, which can be very interesting for research purposes. Besides the control widgets, the framework also includes a set of ready-to-use output and display widgets, which can be easily used to show output images with marks or notations on them, to plot the evolution of output values from the algorithms through time, and generally represent to the user a lot of relevant information about the processing and results of the algorithms. A CPU time consumption measuring widget is also included to easily inspect the computational load of the serveral computation stages involved in the application. Best of all, all these widgets are specifically designed to be used at a minimal programming cost: in just a few lines of code, and with an intuitive and homogeneous programming interface, the framework automatically creates and manages the whole programming interface, letting the researcher to focus on creating, testing and debugging its image processing and computer vision algorithms, without worrying at all for this ver powerful and descriptive user interface. Finally, and besides the graphical user interface, the QVision also smoothly integrates an extendable solution to let the final user of a QVision application set the initial values of the different algorithm parameters through the command line. This allows the easy recreation of test conditions for the algorithms implemented by the applications. QVision is freeThe framework is an open source project. It is released under the GNU Lesser General Public License, version 3, so it can be used to develop either free or commercial applications (as long as you respect the conditions of the different licenses of the underlying libraries and tools -Qt, IPP, GSL, BLAS, LAPACK, QWT, MPlayer, MEncoder, etc.-; consult their corresponding licenses for details). Anyone can contribute to the project by submitting suggestions, feature requests, bugs, or new code or functionality. |