Image Component Library (ICL)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Classes | Typedefs | Enumerations | Functions
icl::qt Namespace Reference

Classes

class  AbstractPlotWidget
 The PlotWidget is an abstract base class for 2D plotting components. More...
class  ICLApplication
 QApplication extension for ICL based applications. More...
struct  BorderBox
 A simple utility class (QWidget with titled border) More...
class  BorderHandle
 Handle class for "border" gui components (only for explicit "border" components) More...
class  BoxHandle
 A Handle for container GUI components (hbox, vbox, hscroll and vscroll) More...
class  ButtonGroupHandle
 Class for handling button goups. More...
class  ButtonHandle
 Special Utiltiy class for handling Button clicks in the ICL GUI API. More...
class  CamCfgWidget
 Special QWidget implementation for configuring grabber properties. More...
class  CheckBoxHandle
 Special Utiltiy class for handling Button clicks in the ICL GUI API. More...
class  ChromaClassifierIO
class  ChromaGUI
 Dedicated GUI component which can be used to adjust segmentation parameters. More...
class  ColorHandle
 Class wrapping ColorLabel GUI compoenent handling. More...
class  ColorLabel
 Utility class to avoid Qt warning when accesing QLabels from differnt Threads. More...
class  ComboHandle
 Handle class for combo components. More...
class  CompabilityLabel
 Utility class to avoid Qt warning when accesing QLabels from differnt Threads. More...
struct  ContainerGUIComponent
 Special GUI extension, that mimics the GUIComponent interface. More...
struct  HBox
 Horizonal Box container component. More...
struct  VBox
 Vertical Box container component. More...
struct  HScroll
 Horizontal scroll area. More...
struct  VScroll
 Vertical scroll area. More...
struct  HSplit
 Horizontal split-component. More...
struct  VSplit
 Vertical split-component. More...
struct  Tab
 Tab-compnent. More...
struct  Border
 internally used component More...
class  ContainerHandle
 Base class for Container like GUI handles as Box- or Tab widgets. More...
class  DataStore
 Extension of the associative container MultiTypeMap. More...
class  DefineQuadrangleMouseHandler
 Special MouseHandler Implementation that allows for defining a quadrangle. More...
class  DefineRectanglesMouseHandler
 Utility mouse handler implementation that allows to define rectangles via drag and drop. More...
class  DispHandle
 Handle class for disp components. More...
class  DoubleSlider
 A utiltiy class which implements a labeld, double valued QSlider. More...
struct  Dragger
 Utility class that implements draggable rects on the ChromaWidget surface. More...
class  DragRectangleMouseHandler
 Special MouseHandler implementation that allows for dragging a Rectangle. More...
class  DrawHandle
 Handle class for image components. More...
class  DrawHandle3D
 Handle class for image components. More...
class  ICLDrawWidget
 Extended Image visualization widget, with a drawing state machine interface. More...
class  ICLDrawWidget3D
 Extended ICLDrawWidget, able to draw 2D and 3D primitives using OpenGL. More...
class  FloatHandle
 Class for handling "float" textfield components. More...
class  FPSHandle
 Class for Frames-per-second GUI-Label. More...
class  FSliderHandle
 Handle class for slider componets. More...
class  GLFragmentShader
 Simple wrapper class for OpenGL 2.0 Fragment Shader Programs. More...
class  GLImg
 OpenGL Texture Map Image class. More...
class  GLPaintEngine
 Paint engine to be used in QGLWigets for a high performance image visualization. More...
class  GUI
 Main Class of ICL's GUI creation framework. More...
class  GUIComponent
 The GUIComponent class servers as a generic interface for GUI definitions. More...
struct  Button
 Button Component. More...
struct  ButtonGroup
 ButtonGroup component (aka vertical list of radio buttons) More...
struct  CheckBox
 CheckBox component. More...
struct  Label
 Label component for displaying text. More...
struct  Slider
 Slider component for int-ranges. More...
struct  FSlider
 Float-valued Slider component. More...
struct  Int
 Text Input component, that allows integer inputs in a given range. More...
struct  Float
 Text Input component, that allows float inputs in a given range. More...
struct  String
 Text Input component, that allows float inputs with a given maximun length. More...
struct  Disp
 Display component for a 2D Array of labels. More...
struct  Image
 Image visualization component. More...
struct  Draw
 Image visualization component that allows for overlayed 2D image annotation. More...
struct  Draw3D
 Image visualization compoent that allows for 2D and 3D image annotation. More...
struct  Plot
 a 2D function and data plotting component More...
struct  Combo
 ComboBox GUI component. More...
struct  Spinner
 SpinBox component. More...
struct  Fps
 Frames per second estimator component. More...
struct  CamCfg
 camera configuration component More...
struct  Prop
 Propery adjustment component for configuable instances. More...
struct  ColorSelect
 Color selection component. More...
struct  Ps
 Process status component. More...
struct  Dummy
 Creates not component. More...
struct  Show
 Finalizes GUI creation (actually creates the Qt-GUI and makes it visible) More...
struct  Create
 Finalizes GUI creation (actually creates the Qt-GUI but initially hidden) More...
struct  GUIComponentWithOutput
class  GUIDefinition
 Utilty class to simplify creation of GUI components. More...
class  GUIHandle
 Abstract base class for Handle classes. More...
class  GUIHandleBase
 Base class for GUIHandles providing functions to register callbacks. More...
class  GUISyntaxErrorException
 Internally used and caught exception class for the GUI API. More...
class  GUIWidget
 Abstract class for GUI components. More...
struct  HistogrammWidget
 Utility class used within the ICLWidget class. More...
class  IconFactory
 Simple utility class providing static functions to create some icons. More...
class  ImageHandle
 Handle class for image components. More...
struct  ImageStatistics
class  ImgParamWidget
 Internally used widget to define image params. More...
class  IntHandle
 Class for handling "int" textfield components. More...
class  LabelHandle
 Class for GUI-Label handling. More...
class  LowLevelPlotWidget
 Default AbstractPlotWidget implementation for plotting different kinds of data. More...
class  MouseEvent
 Provided by interface MouseGrabber. More...
class  MouseHandler
 MouseEvent Handler. More...
class  MultiDrawHandle
 Handle class for image components. More...
class  PaintEngine
 pure virtual Paint engine interface More...
class  PlotHandle
 Handle class for image components. More...
class  PlotWidget
 Easy to use widget component for 2D data visualization. More...
class  ProxyLayout
 just a helper class for GUI Layouting More...
class  QImageConverter
 class for conversion between QImage and core::ImgBase/Img<T> More...
struct  ImgROI
 internal stuct, used for deep image copies More...
class  SliderHandle
 Handle class for slider componets. More...
struct  SliderUpdateEvent
 Utility class for threaded updatable sliders. More...
class  SpinnerHandle
 Handle class for spinner components. More...
class  SplitterHandle
 A Handle for SplitterWidget container GUI components. More...
class  StateHandle
 Class for GUI-Label handling a so called state component. More...
class  StringHandle
 Class for handling "string" textfield components. More...
class  StringSignalButton
 internally used button that emits a signal with its text More...
class  TabHandle
 A Handle for TabWidget container GUI components. More...
class  ThreadedUpdatableSlider
 Compability class. More...
class  ThreadedUpdatableTextView
class  ThreadedUpdatableWidget
 Compability class. More...
class  ToggleButton
class  ICLWidget
 Class for openGL-based image visualization components. More...

Typedefs

typedef ICLApplication ICLApp
 this is just a shortcut typedef
typedef std::vector
< QRadioButton * > 
RadioButtonVec
 type definition for the ButtonGroup handle
typedef utils::Array2D
< LabelHandle
LabelMatrix
 Type definition for handling GUI-"disp" components.
typedef core::Img< ICL_QUICK_TYPEImgQ
 typedef for the quick images type (this time core::Img<icl32f>)

Enumerations

enum  MouseEventType {
  MouseMoveEvent = 0, MouseDragEvent = 1, MousePressEvent = 2, MouseReleaseEvent = 3,
  MouseEnterEvent = 4, MouseLeaveEvent = 5, MouseWheelEvent = 6, MAX_MOUSE_EVENT = MouseWheelEvent
}
 list of supported mouse event types More...
enum  MouseButton { LeftMouseButton = 0, MiddleMouseButton = 1, RightMouseButton = 2, MAX_MOUSE_BUTTON = RightMouseButton }
 list of supported mouse buttons More...
enum  KeyboardModifier {
  NoModifier = Qt::NoModifier, ShiftModifier = Qt::ShiftModifier, ControlModifier = Qt::ControlModifier, AltModifier = Qt::AltModifier,
  MetaModifier = Qt::MetaModifier, KeypadModifier = Qt::KeypadModifier, GroupSwitchModifier = Qt::GroupSwitchModifier
}
enum  ICLWidgetCaptureMode { capturingStarted, capturingStopped, capturingPaused }

Functions

ICLQt_API std::string openFileDialog (const std::string &filter="", const std::string &caption="open file", const std::string &initialDirectory="_____last", void *parentWidget=0) throw (utils::ICLException)
 uses Qt to spawn an open-file dialog with given filter
ICLQt_API std::string saveFileDialog (const std::string &filter="", const std::string &caption="save file", const std::string &initialDirectory="_____last", void *parentWidget=0) throw (utils::ICLException)
 uses Qt to spawn a save-file dialog with given filter
std::string textInputDialog (const std::string &caption="text ...", const std::string &message="please write your text here", const std::string &initialText="", void *parentWidget=0, core::ImgBase *visImage=0) throw (utils::ICLException)
 uses Qt to spawn a text input dialog
ICLQt_API std::string execute_process (const std::string &command)
 executes the given command as a child process and returns it output

creator functions

template<class T >
ICLQt_API core::Img< T > zeros (int width, int height, int channels=1)
 create an empty (black) ImgQ (affinity for floats)
template<class T >
ICLQt_API core::Img< T > ones (int width, int height, int channels=1)
 create an ImgQ that is pre-initialized with ones (affinity for floats)
template<class T >
ICLQt_API core::Img< T > load (const std::string &filename)
 load an image file read file (affinity for floats)
template<class T >
ICLQt_API core::Img< T > load (const std::string &filename, core::format fmt)
 loads an image file and returns image in given core::format (affinity for floats)
template<class T >
ICLQt_API core::Img< T > create (const std::string &name, core::format fmt=icl::core::formatRGB)
 create a test image (converted to destination core::format) (affinity for floats)
template<class T >
ICLQt_API core::Img< T > grab (const std::string &dev, const std::string &devSpec, const utils::Size &size=utils::Size::null, core::format fmt=core::formatRGB, bool releaseGrabber=false)
 grabs a new image from given device (affinity for floats)

converting function

ICLQt_API core::Img8u cvt8u (const ImgQ &image)
 Converts the image into depth8u.
ICLQt_API core::Img16s cvt16s (const ImgQ &image)
 Converts the image into depth16.
ICLQt_API core::Img32s cvt32s (const ImgQ &image)
 Converts the image into depth32s.
ICLQt_API core::Img32f cvt32f (const ImgQ &image)
 Converts the image into depth32f.
ICLQt_API core::Img64f cvt64f (const ImgQ &image)
 Converts the image into depth64f.
ICLQt_API ImgQ cvt (const core::Img8u &image)
 Converts a given core::Img8u into an ImgQ.
ICLQt_API ImgQ cvt (const core::ImgBase *image)
 Converts a given core::ImgBase into an ImgQ.
ICLQt_API ImgQ cvt (const core::ImgBase &image)
 Converts a given core::ImgBase into an ImgQ.

filtering function

template<class T >
ICLQt_API core::Img< T > filter (const core::Img< T > &image, const std::string &filter)
 applies a filter operation on the source image (affinity for float)
template<class T >
ICLQt_API core::Img< T > blur (const core::Img< T > &image, int maskRadius=1)
 applies gaussian blur to a given image (using a maskRadius*2+1-sized gaussian filter)
ICLQt_API ImgQ cc (const ImgQ &image, core::format fmt)
 applies a color conversion
ICLQt_API ImgQ rgb (const ImgQ &image)
 converts a given image to formatRGB
ICLQt_API ImgQ hls (const ImgQ &image)
 converts a given image to formatHLS
ICLQt_API ImgQ lab (const ImgQ &image)
 converts a given image to formatLAB
ICLQt_API ImgQ gray (const ImgQ &image)
 converts a given image to formatGray
ICLQt_API ImgQ scale (const ImgQ &image, float factor)
 scales an image by a given factor
ICLQt_API ImgQ scale (const ImgQ &image, int width, int height)
 scales an image to the given size
ICLQt_API ImgQ channel (const ImgQ &image, int channel)
 picks a specific image channel
ICLQt_API ImgQ levels (const ImgQ &image, icl8u levels)
 reduces an images quantisation levels
ICLQt_API ImgQ thresh (const ImgQ &image, float threshold)
 performs an image binarisation for each channel with given threshold
template<class T >
ICLQt_API core::Img< T > copy (const core::Img< T > &image)
 deep copy for an image
template<class T >
ICLQt_API core::Img< T > copyroi (const core::Img< T > &image)
 deep copy of an images roi
template<class T >
ICLQt_API core::Img< T > norm (const core::Img< T > &image)
 normalize an images range to [0,255]
ICLQt_API ImgQ flipx (const ImgQ &image)
 horizontal flip of an image
ICLQt_API ImgQ flipy (const ImgQ &image)
 vertical flip of an image

output functions

ICLQt_API void save (const core::ImgBase &image, const std::string &filename)
 write an image to HD
ICLQt_API void show (const icl::core::ImgBase &image)
 shows an image using TestImages::show
ICLQt_API void showSetup (const string &showCommand="xv %s", const string &rmCommand="rm -rf %s", int msecBeforeDelete=500)
 setup image visualisation programm
template<class T >
void print (const core::Img< T > &image)
 print the images parameters to std::out

ImgQ arithmetical operators

ICLQt_API ImgQ operator+ (const ImgQ &a, const ImgQ &b)
 adds two images pixel-wise
ICLQt_API ImgQ operator- (const ImgQ &a, const ImgQ &b)
 subtracts two images pixel-wise
ICLQt_API ImgQ operator* (const ImgQ &a, const ImgQ &b)
 multiplies two images pixel-wise
ICLQt_API ImgQ operator/ (const ImgQ &a, const ImgQ &b)
 divides two images pixel-wise
ICLQt_API ImgQ operator+ (const ImgQ &image, float val)
 adds a constant to each pixel value
ICLQt_API ImgQ operator- (const ImgQ &image, float val)
 subtracts a constant to each pixel value
ICLQt_API ImgQ operator* (const ImgQ &image, float val)
 multiplies each pixel value with a constant
ICLQt_API ImgQ operator/ (const ImgQ &image, float val)
 divides each pixel value by a constant
ICLQt_API ImgQ operator+ (float val, const ImgQ &image)
 adds a constant to each pixel value
ICLQt_API ImgQ operator- (float val, const ImgQ &image)
 subtracts each pixel value from a constant
ICLQt_API ImgQ operator* (float val, const ImgQ &image)
 multiplies each pixel value with a constant
ICLQt_API ImgQ operator/ (float val, const ImgQ &image)
 divides a constant by each pixel value
ICLQt_API ImgQ operator- (const ImgQ &image)
 returns image*(-1)

ImgQ arithmetical functions

ICLQt_API ImgQ exp (const ImgQ &image)
 calls exp( each pixel )
ICLQt_API ImgQ ln (const ImgQ &image)
 calls ln( each pixel )
ICLQt_API ImgQ sqr (const ImgQ &image)
 calls ( each pixel )²
ICLQt_API ImgQ sqrt (const ImgQ &image)
 calls sqrt( each pixel)
ICLQt_API ImgQ abs (const ImgQ &image)
 calls abs ( each pixel)

ImgQ logical operators

ICLQt_API ImgQ operator|| (const ImgQ &a, const ImgQ &b)
 pixel-wise logical or
ICLQt_API ImgQ operator&& (const ImgQ &a, const ImgQ &b)
 pixel-wise logical and
template<class T >
ICLQt_API ImgQ binOR (const ImgQ &a, const ImgQ &b)
 pixels-wise binary or (each value is converted to T brefore binary or)
template<class T >
ICLQt_API ImgQ binXOR (const ImgQ &a, const ImgQ &b)
 pixels-wise binary or (each value is converted to T brefore binary or)
template<class T >
ICLQt_API ImgQ binAND (const ImgQ &a, const ImgQ &b)
 pixels-wise binary or (each value is converted to T brefore binary or)

ImgQ concatenation operators

ICLQt_API ImgQ operator, (const ImgQ &a, const ImgQ &b)
 horizontal image concatenation
ICLQt_API ImgQ operator% (const ImgQ &a, const ImgQ &b)
 vertical image combination (as ,-operator)
ICLQt_API ImgQ operator| (const ImgQ &a, const ImgQ &b)
 channel concatenation of images

ImgQ roi copy

ICLQt_API ImgROI roi (ImgQ &r)
 creates a ROI-struct from an image
ICLQt_API ImgROI data (ImgQ &r)
 creates full ROI ROI-struct

drawing functions

ICLQt_API void color (float r, float g=-1, float b=-1, float alpha=255)
 sets the current color to given r,g,b,alpha value
ICLQt_API void fill (float r, float g=-1, float b=-1, float alpha=255)
 sets the current fill color to given r,g,b,alpha value
ICLQt_API void colorinfo (float color[4], float fill[4])
 returns the current color state
ICLQt_API void cross (ImgQ &image, int x, int y)
 draws a 6x6-cross into an image
void cross (ImgQ &image, const utils::Point &p)
 draws a 6x6-cross into an image
ICLQt_API void rect (ImgQ &image, int x, int y, int w, int h, int rounding=0)
 draws a rect into an image
void rect (ImgQ &image, const utils::Rect &r, int rounding=0)
 draws a rect into an image
ICLQt_API void triangle (ImgQ &image, int x1, int y1, int x2, int y2, int x3, int y3)
 draws a triangle into an image
void triangle (ImgQ &image, const utils::Point &a, const utils::Point &b, const utils::Point &c)
 draws a triangle into an image
ICLQt_API void line (ImgQ &image, int x1, int y1, int x2, int y2)
 draws a line into an image
void line (ImgQ &image, const utils::Point &p1, const utils::Point &p2)
 draws a line into an image
ICLQt_API void linestrip (ImgQ &image, const std::vector< utils::Point > &pts, bool closeLoop=true)
 draws a strip of connected lines
ICLQt_API void polygon (ImgQ &image, const std::vector< utils::Point > &corners)
 draws a polygon (constructed out of linestrips
ICLQt_API void pix (ImgQ &image, int x, int y)
 draw a single pixel into an image
void pix (ImgQ &image, const utils::Point &p)
 draw a single pixel into an image
ICLQt_API void pix (ImgQ &image, const vector< utils::Point > &pts)
 draws a set of points into an image
ICLQt_API void pix (ImgQ &image, const vector< vector< utils::Point > > &pts)
 draws a set of point sets into an image
ICLQt_API void circle (ImgQ &image, int x, int y, int r)
 renders a filled circle into an image
ICLQt_API void text (ImgQ &image, int x, int y, const string &text)
 renders a text into an image (only available with Qt-Support)
void text (ImgQ &image, const utils::Point &p, const string &sText)
 renders a text into an image (only available with Qt-Support)
ICLQt_API ImgQ label (const ImgQ &image, const string &text)
 labels an image in the upper left corner (only available with Qt-Support)
ICLQt_API void font (int size, const string &family="Arial")
 sets up the current font (only available with Qt-Support)
ICLQt_API void fontsize (int size)
 sets up current fontsize (only available with Qt-Support)

timer and benchmarking

ICLQt_API void tic (const std::string &label="")
 starts a timer
ICLQt_API void toc ()
 stops a timer started with tic()

Detailed Description


Typedef Documentation

this is just a shortcut typedef

typedef for the quick images type (this time core::Img<icl32f>)


Enumeration Type Documentation

Enumerator:
capturingStarted 
capturingStopped 
capturingPaused 
Enumerator:
NoModifier 

No modifier key is pressed.

ShiftModifier 

A Shift key on the keyboard is pressed.

ControlModifier 

A Ctrl key on the keyboard is pressed.

AltModifier 

An Alt key on the keyboard is pressed.

MetaModifier 

A Meta key on the keyboard is pressed.

KeypadModifier 

A keypad button is pressed.

GroupSwitchModifier 

X11 only. A Mode_switch key on the keyboard is pressed.

list of supported mouse buttons

when ever you'll find a bool downmaks[3], buttons are arranged by this enum order

Enumerator:
LeftMouseButton 

left mouse button

MiddleMouseButton 

middle mouse button

RightMouseButton 

right moouse button

MAX_MOUSE_BUTTON 

highest enum value (enum value count = MAX_MOUSE_BUTTON + 1)

list of supported mouse event types

Enumerator:
MouseMoveEvent 

mouse moved

MouseDragEvent 

mouse button pressed down and held

MousePressEvent 

mouse button pressed

MouseReleaseEvent 

mouse button released

MouseEnterEvent 

mouse entered area

MouseLeaveEvent 

mouse left area

MouseWheelEvent 

mouse wheel

MAX_MOUSE_EVENT 

highest enum value (enum value count = MAX_MOUSE_EVENT + 1)


Function Documentation

ICLQt_API ImgQ icl::qt::abs ( const ImgQ image)

calls abs ( each pixel)

Parameters:
imagesource image
template<class T >
ICLQt_API ImgQ icl::qt::binAND ( const ImgQ a,
const ImgQ b 
)

pixels-wise binary or (each value is converted to T brefore binary or)

template<class T >
ICLQt_API ImgQ icl::qt::binOR ( const ImgQ a,
const ImgQ b 
)

pixels-wise binary or (each value is converted to T brefore binary or)

template<class T >
ICLQt_API ImgQ icl::qt::binXOR ( const ImgQ a,
const ImgQ b 
)

pixels-wise binary or (each value is converted to T brefore binary or)

template<class T >
ICLQt_API core::Img<T> icl::qt::blur ( const core::Img< T > &  image,
int  maskRadius = 1 
)

applies gaussian blur to a given image (using a maskRadius*2+1-sized gaussian filter)

affinity for floats

ICLQt_API ImgQ icl::qt::cc ( const ImgQ image,
core::format  fmt 
)

applies a color conversion

Parameters:
imagesource image*
fmtdestination image format
ICLQt_API ImgQ icl::qt::channel ( const ImgQ image,
int  channel 
)

picks a specific image channel

Parameters:
imagesource image
channelchannel index to pick
ICLQt_API void icl::qt::circle ( ImgQ image,
int  x,
int  y,
int  r 
)

renders a filled circle into an image

This function renders a filled circle into a 3 or 1 channel image (only with fill color!) using a QPainter internally.

Parameters:
imagedestination image
xx-pos of the circle center
yx-pos of the circle center
rradius of the circle
ICLQt_API void icl::qt::color ( float  r,
float  g = -1,
float  b = -1,
float  alpha = 255 
)

sets the current color to given r,g,b,alpha value

Parameters:
rred value
ggreen value (if < 0, g is set to r)
bblue value (if < 0, b is set to r)
alphaalpha value 255 = no transparency, 0 = full transparency
ICLQt_API void icl::qt::colorinfo ( float  color[4],
float  fill[4] 
)

returns the current color state

Parameters:
colordestintaion array for the current draw color
filldestinaion array for the current fill color
template<class T >
ICLQt_API core::Img<T> icl::qt::copy ( const core::Img< T > &  image)

deep copy for an image

Parameters:
imagesource image
template<class T >
ICLQt_API core::Img<T> icl::qt::copyroi ( const core::Img< T > &  image)

deep copy of an images roi

Parameters:
imagesource image
template<class T >
ICLQt_API core::Img<T> icl::qt::create ( const std::string &  name,
core::format  fmt = icl::core::formatRGB 
)

create a test image (converted to destination core::format) (affinity for floats)

Parameters:
nameidentifier for the image: names are: parrot, lena, cameraman, mandril, windows, flowers, women, house and tree
fmtimage core::format to convert the result to
ICLQt_API void icl::qt::cross ( ImgQ image,
int  x,
int  y 
)

draws a 6x6-cross into an image

Parameters:
imagedestination image
xx-pos of the cross
yy-pos of the cross
void icl::qt::cross ( ImgQ image,
const utils::Point p 
) [inline]

draws a 6x6-cross into an image

Parameters:
imagedestination image
pposition
ICLQt_API ImgQ icl::qt::cvt ( const core::Img8u image)

Converts a given core::Img8u into an ImgQ.

Parameters:
imagesource image
Returns:
converted image

Converts a given core::ImgBase into an ImgQ.

Parameters:
imagesource image
Returns:
conveted image

Converts a given core::ImgBase into an ImgQ.

Parameters:
imagesource image
Returns:
conveted image

Converts the image into depth16.

Parameters:
imagesource image
Returns:
converted image

Converts the image into depth32f.

Parameters:
imagesource image
Returns:
converted image

Converts the image into depth32s.

Parameters:
imagesource image
Returns:
converted image

Converts the image into depth64f.

Parameters:
imagesource image
Returns:
converted image

Converts the image into depth8u.

Parameters:
imagesource image
Returns:
converted image

creates full ROI ROI-struct

this can also be used for deep copies

        ImgQ a,b;
        a = aaa    b = bBBBb ( B = ROI pixel )
            aaa        bBBBb ( b = no ROI pixel )
            aaa        bBBBb
                       bbbbb
        data(a) = roi(b)
        a = BBB
            BBB
            BBB
        equal to:
        or a = copyroi(b) // this will release a and reallocate its data 
        
Parameters:
rimage to wrap
ICLQt_API std::string icl::qt::execute_process ( const std::string &  command)

executes the given command as a child process and returns it output

Internally, popen is used

ICLQt_API ImgQ icl::qt::exp ( const ImgQ image)

calls exp( each pixel )

Parameters:
imagesource image
ICLQt_API void icl::qt::fill ( float  r,
float  g = -1,
float  b = -1,
float  alpha = 255 
)

sets the current fill color to given r,g,b,alpha value

Parameters:
rred value
ggreen value (if < 0, g is set to r)
bblue value (if < 0, b is set to r)
alphaalpha value 255 = no transparency, 0 = full transparency
template<class T >
ICLQt_API core::Img<T> icl::qt::filter ( const core::Img< T > &  image,
const std::string &  filter 
)

applies a filter operation on the source image (affinity for float)

Parameters:
imagesource image
filterfilter name, possible: sobelx, sobely, gauss, laplacs, median, dilation,erosion, opening and closing
ICLQt_API ImgQ icl::qt::flipx ( const ImgQ image)

horizontal flip of an image

Parameters:
imagesource image
ICLQt_API ImgQ icl::qt::flipy ( const ImgQ image)

vertical flip of an image

Parameters:
imagesource image
ICLQt_API void icl::qt::font ( int  size,
const string &  family = "Arial" 
)

sets up the current font (only available with Qt-Support)

Parameters:
sizenew font size 12 by default
familyfont family string "Arial" by default
ICLQt_API void icl::qt::fontsize ( int  size)

sets up current fontsize (only available with Qt-Support)

Parameters:
sizenew font size (default is 12)
template<class T >
ICLQt_API core::Img<T> icl::qt::grab ( const std::string &  dev,
const std::string &  devSpec,
const utils::Size size = utils::Size::null,
core::format  fmt = core::formatRGB,
bool  releaseGrabber = false 
)

grabs a new image from given device (affinity for floats)

Parameters:
devdevice driver type (see Generic Grabber for more details)
devSpecdevice specifier
sizeoutput image size (grabbers size if utils::Size::null)
fmtoutput format
releaseGrabberif set to true, the correspondig grabbers are deleted immediately
ICLQt_API ImgQ icl::qt::gray ( const ImgQ image)

converts a given image to formatGray

Parameters:
imagesource image
ICLQt_API ImgQ icl::qt::hls ( const ImgQ image)

converts a given image to formatHLS

Parameters:
imagesource image
ICLQt_API ImgQ icl::qt::lab ( const ImgQ image)

converts a given image to formatLAB

Parameters:
imagesource image
ICLQt_API ImgQ icl::qt::label ( const ImgQ image,
const string &  text 
)

labels an image in the upper left corner (only available with Qt-Support)

Parameters:
imageimage to label
texttext label
Returns:
labeled source image (= given image)
ICLQt_API ImgQ icl::qt::levels ( const ImgQ image,
icl8u  levels 
)

reduces an images quantisation levels

Internally the image is coverted to core::Img8u and back to apply this operation.

Parameters:
imagesource image
levelsgray level count for each channel of the destination image
ICLQt_API void icl::qt::line ( ImgQ image,
int  x1,
int  y1,
int  x2,
int  y2 
)

draws a line into an image

Parameters:
imagedestination image
x1fist point x coord
y1fist point y coord
x2second point x coord
y2second point y coord
void icl::qt::line ( ImgQ image,
const utils::Point p1,
const utils::Point p2 
) [inline]

draws a line into an image

Parameters:
imagedestination image
p1fist point
p2second point
ICLQt_API void icl::qt::linestrip ( ImgQ image,
const std::vector< utils::Point > &  pts,
bool  closeLoop = true 
)

draws a strip of connected lines

Parameters:
imagedestination image
ptslist of points
closeLoopif true, then also the first and the last point is connected
ICLQt_API ImgQ icl::qt::ln ( const ImgQ image)

calls ln( each pixel )

Parameters:
imagesource image
template<class T >
ICLQt_API core::Img<T> icl::qt::load ( const std::string &  filename)

load an image file read file (affinity for floats)

Parameters:
filenamefilename/pattern to read
template<class T >
ICLQt_API core::Img<T> icl::qt::load ( const std::string &  filename,
core::format  fmt 
)

loads an image file and returns image in given core::format (affinity for floats)

Parameters:
filenamefilename to read (*.jpg, *.ppm, *.pgm)
fmtimage core::format to convert the result to
template<class T >
ICLQt_API core::Img<T> icl::qt::norm ( const core::Img< T > &  image)

normalize an images range to [0,255]

Parameters:
imagesource image
template<class T >
ICLQt_API core::Img<T> icl::qt::ones ( int  width,
int  height,
int  channels = 1 
)

create an ImgQ that is pre-initialized with ones (affinity for floats)

Parameters:
widthimage width
heightimage height
channelsimage channel count
ICLQt_API std::string icl::qt::openFileDialog ( const std::string &  filter = "",
const std::string &  caption = "open file",
const std::string &  initialDirectory = "_____last",
void *  parentWidget = 0 
) throw (utils::ICLException)

uses Qt to spawn an open-file dialog with given filter

throws an exception if cancel was pressed. The function is thread-safe and can savely be called from a working thread

ICLQt_API ImgQ icl::qt::operator% ( const ImgQ a,
const ImgQ b 
)

vertical image combination (as ,-operator)

Parameters:
aupper image
blower image
ICLQt_API ImgQ icl::qt::operator&& ( const ImgQ a,
const ImgQ b 
)

pixel-wise logical and

Parameters:
afirst source image
bsecond source image
ICLQt_API ImgQ icl::qt::operator* ( const ImgQ a,
const ImgQ b 
)

multiplies two images pixel-wise

Parameters:
afirst source image
bsecond source image
ICLQt_API ImgQ icl::qt::operator* ( const ImgQ image,
float  val 
)

multiplies each pixel value with a constant

Parameters:
imagesource image
valconst multiplication value
ICLQt_API ImgQ icl::qt::operator* ( float  val,
const ImgQ image 
)

multiplies each pixel value with a constant

Parameters:
imagesource image
valconst multiplication value
ICLQt_API ImgQ icl::qt::operator+ ( const ImgQ a,
const ImgQ b 
)

adds two images pixel-wise

Parameters:
afirst source image
bsecond source image
ICLQt_API ImgQ icl::qt::operator+ ( const ImgQ image,
float  val 
)

adds a constant to each pixel value

Parameters:
imagesource image
valconst addition value
ICLQt_API ImgQ icl::qt::operator+ ( float  val,
const ImgQ image 
)

adds a constant to each pixel value

Parameters:
imagesource image
valconst addition value
ICLQt_API ImgQ icl::qt::operator, ( const ImgQ a,
const ImgQ b 
)

horizontal image concatenation

        example: ImgQ a,b,c;
        a=aaa  b = bbbbb   
          aaa      bbbbb
          aaa
        c = a,b,a;
        c = aaabbbbbaaa
            aaabbbbbaaa
            aaa00000aaa
        

empty spaces are set to 0;

Parameters:
aleft image
bright image
ICLQt_API ImgQ icl::qt::operator- ( const ImgQ a,
const ImgQ b 
)

subtracts two images pixel-wise

Parameters:
afirst source image
bsecond source image
ICLQt_API ImgQ icl::qt::operator- ( const ImgQ image,
float  val 
)

subtracts a constant to each pixel value

Parameters:
imagesource image
valconst subtraction value
ICLQt_API ImgQ icl::qt::operator- ( float  val,
const ImgQ image 
)

subtracts each pixel value from a constant

Parameters:
imagesource image
valconst left value for subtraction
ICLQt_API ImgQ icl::qt::operator- ( const ImgQ image)

returns image*(-1)

Parameters:
imagesource image
ICLQt_API ImgQ icl::qt::operator/ ( const ImgQ a,
const ImgQ b 
)

divides two images pixel-wise

Parameters:
afirst source image
bsecond source image
ICLQt_API ImgQ icl::qt::operator/ ( const ImgQ image,
float  val 
)

divides each pixel value by a constant

Parameters:
imagesource image
valconst division value
ICLQt_API ImgQ icl::qt::operator/ ( float  val,
const ImgQ image 
)

divides a constant by each pixel value

Parameters:
imagesource image
valnominator for the division operation
ICLQt_API ImgQ icl::qt::operator| ( const ImgQ a,
const ImgQ b 
)

channel concatenation of images

Parameters:
afirst image (channels f1,f2,f3,...)
bsecond image (channels s2, s2,s3,...)
Returns:
image with channels (f1,f2,... s1, s2, ...)
ICLQt_API ImgQ icl::qt::operator|| ( const ImgQ a,
const ImgQ b 
)

pixel-wise logical or

Parameters:
afirst source image
bsecond source image
ICLQt_API void icl::qt::pix ( ImgQ image,
int  x,
int  y 
)

draw a single pixel into an image

Parameters:
imagedestination image
xxpos of the pixel
yypos of the pixel
void icl::qt::pix ( ImgQ image,
const utils::Point p 
) [inline]

draw a single pixel into an image

Parameters:
imagedestination image
ppos of the pixel
ICLQt_API void icl::qt::pix ( ImgQ image,
const vector< utils::Point > &  pts 
)

draws a set of points into an image

Parameters:
imagedestination image
ptsvector of points
ICLQt_API void icl::qt::pix ( ImgQ image,
const vector< vector< utils::Point > > &  pts 
)

draws a set of point sets into an image

Parameters:
imagedestination image
ptsvector of vector of points to draw
ICLQt_API void icl::qt::polygon ( ImgQ image,
const std::vector< utils::Point > &  corners 
)

draws a polygon (constructed out of linestrips

template<class T >
void icl::qt::print ( const core::Img< T > &  image)

print the images parameters to std::out

Parameters:
imageimage to print to std::out
ICLQt_API void icl::qt::rect ( ImgQ image,
int  x,
int  y,
int  w,
int  h,
int  rounding = 0 
)

draws a rect into an image

Parameters:
imagedestination image
xx-pos of the rect
yx-pos of the rect
wwidth of the rect
hheight of the rect
roundingrounded corners (in pixels)
void icl::qt::rect ( ImgQ image,
const utils::Rect r,
int  rounding = 0 
) [inline]

draws a rect into an image

Parameters:
imagedestination image
rrect to draw
roundingrounded corners (in pixels)
ICLQt_API ImgQ icl::qt::rgb ( const ImgQ image)

converts a given image to formatRGB

Parameters:
imagesource image

creates a ROI-struct from an image

This function helps to copy images ROIs:

        ImgQ a,b;
        a = aaaaa (A = ROI pixel)
            aaAAA (a = no ROI pixel)
            aaAAA
        b = bbb
            bbb
        roi(a) = b;
        a = aaaaa
            aabbb
            aabbb
        also possible: roi(a) = roi(b);
        
Parameters:
rimage to wrap
ICLQt_API void icl::qt::save ( const core::ImgBase image,
const std::string &  filename 
)

write an image to HD

Parameters:
imagesource image
filenamefilename to write the image to.
ICLQt_API std::string icl::qt::saveFileDialog ( const std::string &  filter = "",
const std::string &  caption = "save file",
const std::string &  initialDirectory = "_____last",
void *  parentWidget = 0 
) throw (utils::ICLException)

uses Qt to spawn a save-file dialog with given filter

throws an exception if cancel was pressed. The function is thread-safe and can savely be called from a working thread

ICLQt_API ImgQ icl::qt::scale ( const ImgQ image,
float  factor 
)

scales an image by a given factor

Parameters:
imagesource image
factorscale factor
ICLQt_API ImgQ icl::qt::scale ( const ImgQ image,
int  width,
int  height 
)

scales an image to the given size

Parameters:
imagesource image
widthdestination image width
heightdestination image height
ICLQt_API void icl::qt::show ( const icl::core::ImgBase image)

shows an image using TestImages::show

The image is wrote to disk into a temporary file. Then it is shown using a specifi show command, which can be set, using the the showSetup function, which is also available in this package.

Parameters:
imageimage to show
See also:
showSetput(const string&, const stirng&, int)
ICLQt_API void icl::qt::showSetup ( const string &  showCommand = "xv %s",
const string &  rmCommand = "rm -rf %s",
int  msecBeforeDelete = 500 
)

setup image visualisation programm

when images are shown using an extrenal viewer like gnu's xv, the image is temporarily written to the hard disk. Then the show command is called. Before the rmCommand is called usleep(1000*msecBeforeDelete); is called, to ensure, that the viewer has read the image completely. By default, the "iclxv" image viewer is used, which is available as example of the ICLQt package. In this case, the showCommand is "iclxv -input %s -delete". As iclxv automatically deletes the image, when it was read, the rmCommand is empty and the wait time is 0. To use this, you have to place at least a link to ICLQt/examples/iclxv into any directory contained in your path variable.

See also:
show
ICLIO/TestImages
ICLQt_API ImgQ icl::qt::sqr ( const ImgQ image)

calls ( each pixel )²

Parameters:
imagesource image
ICLQt_API ImgQ icl::qt::sqrt ( const ImgQ image)

calls sqrt( each pixel)

Parameters:
imagesource image
ICLQt_API void icl::qt::text ( ImgQ image,
int  x,
int  y,
const string &  text 
)

renders a text into an image (only available with Qt-Support)

This functin renders a text into a 3 or 1 channel image using the a QPainter internally.

Parameters:
imagedestination image
xxpos of the lower left corner of the text
yypos of the lower left corner of the text
texttext to render
void icl::qt::text ( ImgQ image,
const utils::Point p,
const string &  sText 
) [inline]

renders a text into an image (only available with Qt-Support)

This functin renders a text into an 3 or 1 channel image using the a QPainter internally.

Parameters:
imagedestination image
ppos of the lower left corner of the text
sTexttext to render
std::string icl::qt::textInputDialog ( const std::string &  caption = "text ...",
const std::string &  message = "please write your text here",
const std::string &  initialText = "",
void *  parentWidget = 0,
core::ImgBase visImage = 0 
) throw (utils::ICLException)

uses Qt to spawn a text input dialog

throws an exception if cancel was pressed. The function is thread-safe and can savely be called from a working thread. If the visImage pointer is not null, it will be visualized in the dialog

ICLQt_API ImgQ icl::qt::thresh ( const ImgQ image,
float  threshold 
)

performs an image binarisation for each channel with given threshold

Parameters:
imagesource image
thresholdthreshold to compare each pixel with
ICLQt_API void icl::qt::tic ( const std::string &  label = "")

starts a timer

stops a timer started with tic()

ICLQt_API void icl::qt::triangle ( ImgQ image,
int  x1,
int  y1,
int  x2,
int  y2,
int  x3,
int  y3 
)

draws a triangle into an image

given 3 points (x1,y1),(x2,y2),(x3,y3)

void icl::qt::triangle ( ImgQ image,
const utils::Point a,
const utils::Point b,
const utils::Point c 
) [inline]

draws a triangle into an image

template<class T >
ImgQ icl::qt::zeros ( int  width,
int  height,
int  channels = 1 
) [inline]

create an empty (black) ImgQ (affinity for floats)

Parameters:
widthimage width
heightimage height
channelsimage channel count
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines