Image Component Library (ICL)
|
Classes | |
struct | icl::core::Parable |
Utility class for the parable-based chromaticity segmentation. More... | |
struct | icl::qt::BorderBox |
A simple utility class (QWidget with titled border) More... | |
class | icl::qt::DataStore |
Extension of the associative container MultiTypeMap. More... | |
class | icl::qt::DoubleSlider |
A utiltiy class which implements a labeld, double valued QSlider. More... | |
struct | icl::qt::Dragger |
Utility class that implements draggable rects on the ChromaWidget surface. More... | |
class | icl::qt::GLPaintEngine |
Paint engine to be used in QGLWigets for a high performance image visualization. More... | |
class | icl::qt::GUIDefinition |
Utilty class to simplify creation of GUI components. More... | |
class | icl::qt::GUIHandleBase |
Base class for GUIHandles providing functions to register callbacks. More... | |
class | icl::qt::GUISyntaxErrorException |
Internally used and caught exception class for the GUI API. More... | |
class | icl::qt::GUIWidget |
Abstract class for GUI components. More... | |
class | icl::qt::ImgParamWidget |
Internally used widget to define image params. More... | |
class | icl::qt::PaintEngine |
pure virtual Paint engine interface More... | |
class | icl::qt::ProxyLayout |
just a helper class for GUI Layouting More... | |
class | icl::qt::StringSignalButton |
internally used button that emits a signal with its text More... |
As it's core, this package provides a wrapper API for Qt-based GUI components. The main class of this package is the icl::GUI class. Further essential components are located in the Image Visualisation and Annotation Framework .
When developing computer vision applications, one does usually not want to fight with the common GUI issues -- such as layouting GUI components and synchronizing GUI events and values with the applications working thread. To avoid theses issues, ICL comes up with a string- and stream-based GUI creation framework, that allows for creating most complex GUIs with just a few lines of well readable code. However it always provides full access to the underlying Qt-components to enable the user to use traditional Qt-code to implement custom stuff where it is needed.
The GUI-framework provides some special components, such as the image visualization and annotation widgets (Image Visualisation and Annotation Framework) and the icl::PlotWidget for 2D data visualization. In addition all common Qt-components, such as sliders and buttons, are also wrapped.
Development of a QWidget implementation for image visualisation implies finding answers to the following questions:
ICL's image visualization and annotation framework consists essentially of the three widget classes
At the lowest layer, the icl::GLImg provides an interfaces for converting ImgBase instances into an OpenGL texture (if the image is larger than OpenGL's maximum texture sizes, it has to be split into several texture) that can be drawn arbitrarily into an OpenGL scene. Internally, the icl::GLImg class is used for different image depths depths. Here, OpenGL's pixel-transfer parameters are used for hardware accelerated brightness and contrast adjustment. Furthermore, fitting images into the widget viewport can simply be performed by the graphics hardware. The GLImg can also be used as efficient video texture. The next layer is implemented by the icl::ICLWidget class, which inherits Qt's QGLWidget class for creation of an embedded OpenGL context and viewport. The ICLWidget provides a software interface for setting different visualisation parameters (explained in the icl::ICLWidget documentation) as well as an embedded user interface for interactive adaption of these parameters. Furthermore, the ICLWidgets provides a function For image annotation (such as rendering boxes or symbols on top of the image to visualize image processing results), the icl::ICLDrawWidget is provided. It works like a drawing state-machine that automatically synchronized image annotations with Qt's event loop. Internally, this is achieved by using two thread-safe draw-command queues. One of these queues can be filled with new draw commands, while the other queue belongs to the GUI thread and is rendered. Every time, the parent icl::ICLWidget classes icl::ICLWidget::render() method is called, the queues are swapped, and the queue that is now being filled with new commands is automatically cleared. Here, the icl::ICLDrawWidget adapts the behavior of the parent icl::ICLWidget class. The icl::ICLDrawWidget will not automatically call ICLWidget::render() when a new background image is given. Since usually setting the background image is followed by posting a set of draw-commands, icl::ICLWidget::render() has to be called manually, once the image annotation is finished. (TODO add reference to example) On the last level, the icl::ICLDrawWidget3D, which itself extends the icl::ICLDrawWidget, provides an interfaces for rendering 3D stuff on top of an image. The icl::ICLDrawWidget3D provides the icl::ICLDrawWidget3D::link method, which links a simple callback function to it. When the icl::ICLDrawWidget3D is rendered, it will also execute the linked OpenGL callback function in the GUI Thread, while still being able to render 2D annotations. It is highly recommended to use the icl::Scene class to create 3D rendering overlays The scene class can easily provide an appropriate OpenGL callback function for it's contained cameras. Usage examples are given on ICL's webpage. Select info->tutorial in the top-menu. |
note: this section is not up-to-date The leftmost button shows or hides the menu. By default, the menu is embedded into the widget. The 2nd button detaches the menu from the widget and makes the menu an independent window. The next button that shows two diagonally aligned filled squares changes the internal image interpolation mode. By default, the image texture is painted using nearest neighbour interpolation, which means that image pixels have hard edges in zoomed view. If the interpolation mode button is toggled a linear interpolation is used for texture rendering. The iterative zoom button, which is left to the image interpolation button, can be used to drag a zooming area. If the image zoom is active, the image zoom button is tainted red. Another click on the image zoom button disabled the image zoom to re-activated the original mode. The rightmost button is only visible if the widget's content is currently recorded from the widgets menu. It can be used as a shotcut to stop recording even if the menu is currently not visible. A detailed explanation of the on-screen-menu itself is provided in the icl::ICLWidget's documentation. |