Image Component Library (ICL)
Classes | Namespaces | Macros | Typedefs | Functions
Quick.h File Reference
#include <ICLUtils/CompatMacros.h>
#include <ICLUtils/StringUtils.h>
#include <ICLUtils/Exception.h>
#include <ICLCore/Img.h>

Go to the source code of this file.

Classes

struct  icl::qt::ImgROI
 internal stuct, used for deep image copies More...
 

Namespaces

 icl
 undocument this line if you encounter any issues!
 
 icl::utils
 
 icl::math
 
 icl::core
 
 icl::filter
 
 icl::io
 
 icl::qt
 
 icl::geom
 
 icl::cv
 
 icl::markers
 
 icl::physics
 

Macros

#define ICL_QUICK_DEPTH   depth32f
 
#define ICL_QUICK_TYPE   icl32f
 

Typedefs

typedef core::Img< ICL_QUICK_TYPEicl::qt::ImgQ
 typedef for the quick images type (this time core::Img<icl32f>) More...
 

Functions

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)
 uses Qt to spawn an open-file dialog with given filter More...
 
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)
 uses Qt to spawn a save-file dialog with given filter More...
 
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, std::vector< std::string > completionOptions=std::vector< std::string >())
 uses Qt to spawn a text input dialog More...
 
ICLQt_API std::string icl::qt::execute_process (const std::string &command)
 executes the given command as a child process and returns it output More...
 

creator functions

template<class T >
ICLQt_API core::Img< T > icl::qt::zeros (int width, int height, int channels=1)
 create an empty (black) ImgQ (affinity for floats) More...
 
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) More...
 
template<class T >
ICLQt_API core::Img< T > icl::qt::load (const std::string &filename)
 load an image file read file (affinity for floats) More...
 
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) More...
 
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) More...
 
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) More...
 

converting function

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

filtering function

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) More...
 
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) More...
 
ICLQt_API ImgQ icl::qt::cc (const ImgQ &image, core::format fmt)
 applies a color conversion More...
 
ICLQt_API ImgQ icl::qt::rgb (const ImgQ &image)
 converts a given image to formatRGB More...
 
ICLQt_API ImgQ icl::qt::hls (const ImgQ &image)
 converts a given image to formatHLS More...
 
ICLQt_API ImgQ icl::qt::lab (const ImgQ &image)
 converts a given image to formatLAB More...
 
ICLQt_API ImgQ icl::qt::gray (const ImgQ &image)
 converts a given image to formatGray More...
 
ICLQt_API ImgQ icl::qt::scale (const ImgQ &image, float factor)
 scales an image by a given factor More...
 
ICLQt_API ImgQ icl::qt::scale (const ImgQ &image, int width, int height)
 scales an image to the given size More...
 
ICLQt_API ImgQ icl::qt::channel (const ImgQ &image, int channel)
 picks a specific image channel More...
 
ICLQt_API ImgQ icl::qt::levels (const ImgQ &image, icl8u levels)
 reduces an images quantisation levels More...
 
ICLQt_API ImgQ icl::qt::thresh (const ImgQ &image, float threshold)
 performs an image binarisation for each channel with given threshold More...
 
template<class T >
ICLQt_API core::Img< T > icl::qt::copy (const core::Img< T > &image)
 deep copy for an image More...
 
template<class T >
ICLQt_API core::Img< T > icl::qt::copyroi (const core::Img< T > &image)
 deep copy of an images roi More...
 
template<class T >
ICLQt_API core::Img< T > icl::qt::norm (const core::Img< T > &image)
 normalize an images range to [0,255] More...
 
ICLQt_API ImgQ icl::qt::flipx (const ImgQ &image)
 horizontal flip of an image More...
 
ICLQt_API ImgQ icl::qt::flipy (const ImgQ &image)
 vertical flip of an image More...
 

output functions

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

ImgQ arithmetical operators

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

ImgQ arithmetical functions

ICLQt_API ImgQ icl::qt::exp (const ImgQ &image)
 calls exp( each pixel ) More...
 
ICLQt_API ImgQ icl::qt::ln (const ImgQ &image)
 calls ln( each pixel ) More...
 
ICLQt_API ImgQ icl::qt::sqr (const ImgQ &image)
 calls ( each pixel )² More...
 
ICLQt_API ImgQ icl::qt::sqrt (const ImgQ &image)
 calls sqrt( each pixel) More...
 
ICLQt_API ImgQ icl::qt::abs (const ImgQ &image)
 calls abs ( each pixel) More...
 

ImgQ logical operators

ICLQt_API ImgQ icl::qt::operator|| (const ImgQ &a, const ImgQ &b)
 pixel-wise logical or More...
 
ICLQt_API ImgQ icl::qt::operator && (const ImgQ &a, const ImgQ &b)
 pixel-wise logical and More...
 
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) More...
 
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) More...
 
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) More...
 

ImgQ concatenation operators

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

ImgQ roi copy

ICLQt_API ImgROI icl::qt::roi (ImgQ &r)
 creates a ROI-struct from an image More...
 
ICLQt_API ImgROI icl::qt::data (ImgQ &r)
 creates full ROI ROI-struct More...
 

drawing functions

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 More...
 
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 More...
 
ICLQt_API void icl::qt::colorinfo (float color[4], float fill[4])
 returns the current color state More...
 
ICLQt_API void icl::qt::cross (ImgQ &image, int x, int y)
 draws a 6x6-cross into an image More...
 
void icl::qt::cross (ImgQ &image, const utils::Point &p)
 draws a 6x6-cross into an image More...
 
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 More...
 
void icl::qt::rect (ImgQ &image, const utils::Rect &r, int rounding=0)
 draws a rect into an image More...
 
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 More...
 
void icl::qt::triangle (ImgQ &image, const utils::Point &a, const utils::Point &b, const utils::Point &c)
 draws a triangle into an image More...
 
ICLQt_API void icl::qt::line (ImgQ &image, int x1, int y1, int x2, int y2)
 draws a line into an image More...
 
void icl::qt::line (ImgQ &image, const utils::Point &p1, const utils::Point &p2)
 draws a line into an image More...
 
ICLQt_API void icl::qt::linestrip (ImgQ &image, const std::vector< utils::Point > &pts, bool closeLoop=true)
 draws a strip of connected lines More...
 
ICLQt_API void icl::qt::polygon (ImgQ &image, const std::vector< utils::Point > &corners)
 draws a polygon (constructed out of linestrips More...
 
ICLQt_API void icl::qt::pix (ImgQ &image, int x, int y)
 draw a single pixel into an image More...
 
void icl::qt::pix (ImgQ &image, const utils::Point &p)
 draw a single pixel into an image More...
 
ICLQt_API void icl::qt::pix (ImgQ &image, const vector< utils::Point > &pts)
 draws a set of points into an image More...
 
ICLQt_API void icl::qt::pix (ImgQ &image, const vector< vector< utils::Point > > &pts)
 draws a set of point sets into an image More...
 
ICLQt_API void icl::qt::circle (ImgQ &image, int x, int y, int r)
 renders a filled circle into an image More...
 
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) More...
 
void icl::qt::text (ImgQ &image, const utils::Point &p, const string &sText)
 renders a text into an image (only available with Qt-Support) More...
 
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) More...
 
ICLQt_API void icl::qt::font (int size, const string &family="Arial")
 sets up the current font (only available with Qt-Support) More...
 
ICLQt_API void icl::qt::fontsize (int size)
 sets up current fontsize (only available with Qt-Support) More...
 

timer and benchmarking

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

Macro Definition Documentation

◆ ICL_QUICK_DEPTH

#define ICL_QUICK_DEPTH   depth32f

◆ ICL_QUICK_TYPE

#define ICL_QUICK_TYPE   icl32f