Image Component Library (ICL)
Public Slots | Public Member Functions | Private Attributes | List of all members
icl::qt::ChromaGUI Class Reference

Dedicated GUI component which can be used to adjust segmentation parameters. More...

#include <ChromaGUI.h>

Inheritance diagram for icl::qt::ChromaGUI:
icl::qt::GUI

Public Slots

void blueSliderChanged (int val)
 used for the blue-value visualization slider More...
 
void save (const std::string &filename="")
 used for the save-button More...
 
void load (const std::string &filename="")
 used for the load-button More...
 

Public Member Functions

 ChromaGUI (QWidget *parent=0)
 Create a new ChromaGUI with given parent widget. More...
 
core::ChromaClassifier getChromaClassifier ()
 retuns a ChomaClassifier with current parameters More...
 
core::ChromaAndRGBClassifier getChromaAndRGBClassifier ()
 retuns a CombiClassifier with current parameters More...
 
- Public Member Functions inherited from icl::qt::GUI
 GUI (QWidget *parent=0)
 Default constructor, creates a vbox GUI Component. More...
 
 GUI (const GUIComponent &component, QWidget *parent=0)
 creates a GUI from a givne GUIComponent More...
 
 GUI (const GUI &gui, QWidget *parent=0)
 copy constructor More...
 
GUIoperator= (const GUI &other)
 gui-copy operator More...
 
virtual ~GUI ()
 Destructor. More...
 
virtual GUIoperator<< (const GUIComponent &component)
 adds a new GUI component More...
 
virtual GUIoperator<< (const GUI &g)
 stream operator to add new other GUIs More...
 
template<class T >
T & allocValue (const std::string &id, const T &val=T())
 wraps the data-stores allocValue function More...
 
template<class T >
void release (const std::string &id)
 wraps the datastores release function More...
 
template<class T >
T & get (const std::string &id, bool typeCheck=true)
 
DataStore::Data operator[] (const std::string &key)
 returns a Data instance from the datastore More...
 
template<class T >
std::vector< T > collect (const std::vector< std::string > &keys)
 collects data from different components at once More...
 
virtual bool isVisible () const
 returns whether this gui is actually visible More...
 
virtual void create ()
 internally creates everything More...
 
virtual void show ()
 internally creates everything (and makes the gui visible) More...
 
virtual void hide ()
 make this gui invisible (nothing more) More...
 
virtual void switchVisibility ()
 if widget is visible, this hides the widget, otherwise the widget is shown More...
 
GUIWidgetgetRootWidget ()
 returns the root widget of the gui (only avialable after create() or show()) More...
 
void lockData ()
 internally locks the datastore More...
 
void unlockData ()
 internally unlocks the data store More...
 
void waitForCreation ()
 waits for the gui to be created completely More...
 
const DataStoregetDataStore () const
 returns the GUI internal dataStore More...
 
void registerCallback (const Callback &cb, const std::string &handleNamesList, char listDelim=',')
 registers a callback function on each component More...
 
void registerCallback (const ComplexCallback &cb, const std::string &handleNamesList, char listDelim=',')
 registeres a complex callback at a given GUI component More...
 
void removeCallbacks (const std::string &handleNamesList, char listDelim=',')
 removes all callbacks from components More...
 
bool isDummy () const
 returns whether this GUI is a dummy GUI More...
 
bool hasBeenCreated () const
 returns whether this GUI has been created or not More...
 
std::string createXMLDescription () const
 creates a hierarchical xml-description of the GUI Layout More...
 

Private Attributes

ChromaWidget * m_poChromaWidget
 Wrapped ChromaWidget (an internal class) More...
 
SliderHandle m_aoSliderHandles [2][3]
 Handles to the embedded sliders. More...
 

Additional Inherited Members

- Public Types inherited from icl::qt::GUI
typedef utils::Function< GUIWidget *, const GUIDefinition & > CreatorFunction
 registered widget type creator function More...
 
typedef utils::Function< void > Callback
 simple callback, that can be registered at GUI components More...
 
typedef utils::Function< void, const std::string & > ComplexCallback
 complex callback type that can be registered at GUI components More...
 
- Static Public Member Functions inherited from icl::qt::GUI
static void register_widget_type (const std::string &tag, CreatorFunction f)
 registers a new widget type More...
 
static GUI create_gui_from_string (const std::string &definition, QWidget *parent)
 legacy creation method (use with care) More...
 
- Static Public Attributes inherited from icl::qt::GUI
static const int CELLW = 20
 cell width (all sizes are given in this unit) More...
 
static const int CELLH = 20
 cell height (all sizes are given in this unit) More...
 
- Protected Member Functions inherited from icl::qt::GUI
 GUI (const std::string &definition, QWidget *parent)
 default constructor More...
 
virtual std::string createDefinition () const
 can be overwritten in subclasses (such as ContainerGUIComponent) More...
 

Detailed Description

Dedicated GUI component which can be used to adjust segmentation parameters.

The RG-Chromaticity space is a special Color-Space, which can be used for a lighting-independend skin color segmentation. The segmentation is parameterized by two parabolic functions $P_1(x)$ and $P_2(x)$. The pixel classification rule (is pixels skin-colored or not) can be defindes as follows:

bool is_pixel_skin_colored(int r,int g,int b, Parable p1, Parable p2){
int R = (255*r)/(r+g+b+1); // "+1" to avoid a div-zero
int G = (255*g)/(r+g+b+1);
return p1(R) > G && p2(R) < G;
}

The so called "skin-locus" is defined by the two enclosing parables $P_1(x)$ and $P_2(x)$. A pixel is skin colored if it is between the two parables - or more precisely: if it is on the bottom side of the first and on the top side of the second.

In addition the ChromaGUI class provides a simple RGB thresholded reference color segmenter, which can be combined with the chromaticity-space segmenter, and which can also be adjusted using GUI components.

Constructor & Destructor Documentation

◆ ChromaGUI()

icl::qt::ChromaGUI::ChromaGUI ( QWidget *  parent = 0)

Create a new ChromaGUI with given parent widget.

Member Function Documentation

◆ blueSliderChanged

void icl::qt::ChromaGUI::blueSliderChanged ( int  val)
slot

used for the blue-value visualization slider

◆ getChromaAndRGBClassifier()

core::ChromaAndRGBClassifier icl::qt::ChromaGUI::getChromaAndRGBClassifier ( )

retuns a CombiClassifier with current parameters

◆ getChromaClassifier()

core::ChromaClassifier icl::qt::ChromaGUI::getChromaClassifier ( )

retuns a ChomaClassifier with current parameters

◆ load

void icl::qt::ChromaGUI::load ( const std::string &  filename = "")
slot

used for the load-button

◆ save

void icl::qt::ChromaGUI::save ( const std::string &  filename = "")
slot

used for the save-button

Member Data Documentation

◆ m_aoSliderHandles

SliderHandle icl::qt::ChromaGUI::m_aoSliderHandles[2][3]
private

Handles to the embedded sliders.

◆ m_poChromaWidget

ChromaWidget* icl::qt::ChromaGUI::m_poChromaWidget
private

Wrapped ChromaWidget (an internal class)


The documentation for this class was generated from the following file: