Image Component Library (ICL)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
icl::markers::FiducialDetectorPlugin Struct Referenceabstract

Generic Interface class for FiducialDetector plugins. More...

#include <FiducialDetectorPlugin.h>

Inheritance diagram for icl::markers::FiducialDetectorPlugin:
icl::utils::Configurable icl::markers::FiducialDetectorPluginForQuads icl::markers::FiducialDetectorPluginHierarchical icl::markers::FiducialDetectorPluginART icl::markers::FiducialDetectorPluginBCH icl::markers::FiducialDetectorPluginAmoeba icl::markers::FiducialDetectorPluginICL1

Public Types

enum  SourceImageType { Binary, Gray, Color }
 Enumeration for differnt source image types. More...
 
- Public Types inherited from icl::utils::Configurable
typedef Function< void, const
Property & > 
Callback
 Function type for changed properties. More...
 

Public Member Functions

 FiducialDetectorPlugin ()
 initializes the plugin with a 0-camera More...
 
virtual ~FiducialDetectorPlugin ()
 virtual Destructor More...
 
virtual void getCenter2D (utils::Point32f &dst, FiducialImpl &impl)
 returns how to compute the markers 2D center More...
 
virtual void getRotation2D (float &dst, FiducialImpl &impl)
 returns how to compute the markers 2D rotation More...
 
virtual void getCorners2D (std::vector< utils::Point32f > &dst, FiducialImpl &impl)
 returns how to compute the markers 2D corners (or significant points on its edges More...
 
virtual void getKeyPoints2D (std::vector< Fiducial::KeyPoint > &dst, FiducialImpl &impl)
 returns how to compute a list of image-position/marker-position correspondences More...
 
virtual void getCenter3D (geom::Vec &dst, FiducialImpl &impl)
 computes a markers 3D center More...
 
virtual void getRotation3D (geom::Vec &dst, FiducialImpl &impl)
 computes a markers 3D rotation euler angles More...
 
virtual void getPose3D (geom::Mat &dst, FiducialImpl &impl)
 computes a markers 3D position and rotation euler angles More...
 
virtual SourceImageType getPreProcessing () const
 returns Binary (as default) More...
 
virtual void getFeatures (Fiducial::FeatureSet &dst)=0
 defines which features are supported More...
 
virtual void detect (std::vector< FiducialImpl * > &dst, const core::Img8u &image)=0
 defines how to detect markers from a given image More...
 
virtual void addOrRemoveMarkers (bool add, const utils::Any &which, const utils::ParamList &params)=0
 defines how to load/remove marker definitions More...
 
virtual std::string getName (const FiducialImpl *impl)
 creates a human readable name for the given impl More...
 
virtual std::string getIntermediateImageNames () const
 optionall returns a (comma separated) list of intermediate images More...
 
virtual const core::ImgBasegetIntermediateImage (const std::string &name) const throw (utils::ICLException)
 returns the intermediate image, that is associated with the given name More...
 
virtual core::Img8u createMarker (const utils::Any &, const utils::Size &, const utils::ParamList &)
 interface for creating an image of a specific marker More...
 
- Public Member Functions inherited from icl::utils::Configurable
virtual ~Configurable ()
 virtual destructor More...
 
 Configurable (const Configurable &other)
 Copy constructor. More...
 
Configurableoperator= (const Configurable &other)
 Assignment operator. More...
 
void setConfigurableID (const std::string &ID) throw (ICLException)
 sets the ID of this configurable More...
 
const std::string & getConfigurableID () const
 returns the configurables static ID More...
 
bool isOrderedFlagSet () const
 returns whether the ordered flag is set More...
 
void deactivateProperty (const std::string &pattern)
 adds an additional deativation pattern More...
 
void deleteDeactivationPattern (const std::string &pattern)
 removed a formerly added deactivation pattern More...
 
std::vector< std::string > getPropertyListWithoutDeactivated () const
 this returns a filtered list of properties (using all filters added by deactivateProperty) More...
 
virtual void adaptProperty (const std::string &name, const std::string &newType, const std::string &newInfo, const std::string &newToolTip) throw (ICLException)
 this function can be used to adapt a specific property afterwards More...
 
void registerCallback (const Callback &cb)
 add a callback for changed properties More...
 
void removedCallback (const Callback &cb)
 removes a callback that was registered before More...
 
void syncChangesTo (Configurable *others, int num=1)
 this can be used to let this instance also apply property changes to others More...
 
virtual void setPropertyValue (const std::string &propertyName, const Any &value) throw (ICLException)
 sets a property value More...
 
virtual std::vector< std::string > getPropertyList () const
 returns a list of All properties, that can be set using setProperty More...
 
virtual bool supportsProperty (const std::string &propertyName) const
 base implementation for property check (seaches in the property list) More...
 
virtual void saveProperties (const std::string &filename, const std::vector< std::string > &propertiesToSkip=EMPTY_VEC) const
 writes all available properties into a file More...
 
virtual void loadProperties (const std::string &filename, const std::vector< std::string > &propertiesToSkip=EMPTY_VEC)
 reads a camera config file from disc More...
 
virtual std::string getPropertyType (const std::string &propertyName) const
 get type of property More...
 
virtual std::string getPropertyInfo (const std::string &propertyName) const
 get information of a properties valid values More...
 
virtual Any getPropertyValue (const std::string &propertyName) const
 returns the current value of a property or a parameter More...
 
virtual std::string getPropertyToolTip (const std::string &propertyName) const
 returns the tooltip description for a given property More...
 
virtual int getPropertyVolatileness (const std::string &propertyName) const
 Returns whether this property may be changed internally. More...
 

Static Public Member Functions

static std::vector< int > parse_list_str (const utils::Any &s)
 parses an any instance that is either an int-value, or a range or a list of int-values More...
 
- Static Public Member Functions inherited from icl::utils::Configurable
static std::string create_default_ID (const std::string &prefix)
 this function can be used in subclasses to create a default ID More...
 
static Configurableget (const std::string &id)
 returns configurable by given ID More...
 
static void register_configurable_type (const std::string &classname, Function< Configurable * > creator) throw (ICLException)
 registers a configurable type More...
 
static std::vector< std::string > get_registered_configurables ()
 returns a list of all registered configurable classnames More...
 
static Configurablecreate_configurable (const std::string &classname) throw (ICLException)
 creates a configurable by given name More...
 

Public Attributes

geom::Cameracamera
 Camera structure for 3D feature estimation. More...
 
geom::CoplanarPointPoseEstimator poseEst
 for 3D pose estimation More...
 

Additional Inherited Members

- Static Public Attributes inherited from icl::utils::Configurable
static const std::vector
< std::string > 
EMPTY_VEC
 used as shortcut – just an empty vector of std::strings More...
 
- Protected Member Functions inherited from icl::utils::Configurable
void addProperty (const std::string &name, const std::string &type, const std::string &info, const Any &value=Any(), const int volatileness=0, const std::string &tooltip=std::string()) throw (ICLException)
 This can be used by derived classes to store supported properties in the internal list. More...
 
void addChildConfigurable (Configurable *configurable, const std::string &childPrefix="")
 This adds another configurable as child. More...
 
void removeChildConfigurable (Configurable *configurable)
 removes the given child configurable More...
 
Propertyprop (const std::string &propertyName) throw (ICLException)
 this CAN be used e.g. to store a property value in internal property-list More...
 
const Propertyprop (const std::string &propertyName) const throw (ICLException)
 this CAN be used e.g. to store a property value in internal property-list More...
 
 Configurable (const std::string &ID="", bool ordered=true) throw (ICLException)
 create this configurable with given ID More...
 
void call_callbacks (const std::string &propertyName, const Configurable *caller) const
 calls all registered callbacks More...
 
- Protected Attributes inherited from icl::utils::Configurable
std::vector< Callbackcallbacks
 internally managed list of callbacks More...
 

Detailed Description

Generic Interface class for FiducialDetector plugins.

Member Enumeration Documentation

Enumeration for differnt source image types.

Enumerator
Binary 

detect must be called with an already binarized image (default)

Gray 

detect must be called with gray scale image

Color 

detect must be called with color image

Constructor & Destructor Documentation

icl::markers::FiducialDetectorPlugin::FiducialDetectorPlugin ( )

initializes the plugin with a 0-camera

virtual icl::markers::FiducialDetectorPlugin::~FiducialDetectorPlugin ( )
inlinevirtual

virtual Destructor

Member Function Documentation

virtual void icl::markers::FiducialDetectorPlugin::addOrRemoveMarkers ( bool  add,
const utils::Any which,
const utils::ParamList params 
)
pure virtual
virtual core::Img8u icl::markers::FiducialDetectorPlugin::createMarker ( const utils::Any ,
const utils::Size ,
const utils::ParamList  
)
inlinevirtual

interface for creating an image of a specific marker

Reimplemented in icl::markers::FiducialDetectorPluginART, icl::markers::FiducialDetectorPluginICL1, and icl::markers::FiducialDetectorPluginBCH.

virtual void icl::markers::FiducialDetectorPlugin::detect ( std::vector< FiducialImpl * > &  dst,
const core::Img8u image 
)
pure virtual

defines how to detect markers from a given image

Implemented in icl::markers::FiducialDetectorPluginForQuads, and icl::markers::FiducialDetectorPluginHierarchical.

virtual void icl::markers::FiducialDetectorPlugin::getCenter2D ( utils::Point32f dst,
FiducialImpl impl 
)
virtual

returns how to compute the markers 2D center

note, if this information is already available in the detect method, the plugin implementation should instantiate the returned FiducialImpl instances, with this this information given. If the fiducial imple was instantiated this way, the corresponding getter method must not be reimplemented, because the Fiducial wrapper (that wraps the FiducialImpl) will simple return the already available result from the corresponding FiducialImpl's info structure

virtual void icl::markers::FiducialDetectorPlugin::getCenter3D ( geom::Vec dst,
FiducialImpl impl 
)
virtual

computes a markers 3D center

The defalut implementation uses getKeyPoints2D for planar pose estimation. If getKeyPoints is not implemented or if less than 4 key points are available, the default implementation for getCenter3D will not work Note: 3D information are usually only available if a camera was given to the parent FiducialDetector class

virtual void icl::markers::FiducialDetectorPlugin::getCorners2D ( std::vector< utils::Point32f > &  dst,
FiducialImpl impl 
)
virtual

returns how to compute the markers 2D corners (or significant points on its edges

The corners can also be whole line-strips, usually, these are used for visualization only

Reimplemented in icl::markers::FiducialDetectorPluginICL1, and icl::markers::FiducialDetectorPluginAmoeba.

virtual void icl::markers::FiducialDetectorPlugin::getFeatures ( Fiducial::FeatureSet dst)
pure virtual
virtual const core::ImgBase* icl::markers::FiducialDetectorPlugin::getIntermediateImage ( const std::string &  name) const
throw (utils::ICLException
)
inlinevirtual

returns the intermediate image, that is associated with the given name

The programmer of a plugin must ensure, that an exception is thrown if the given name is not associated with an intermediate image. The parent FiducialDetectors intermediate images with names "input" and "pp" must not be checked here. But in turn, these two names must not be used for intermediate image names in the plugin implementation

Reimplemented in icl::markers::FiducialDetectorPluginForQuads.

virtual std::string icl::markers::FiducialDetectorPlugin::getIntermediateImageNames ( ) const
inlinevirtual

optionall returns a (comma separated) list of intermediate images

These images can be used for debugging purpose as well as for further processing steps. The two intermediate image names 'input' and 'pp' must not be used in the plugin implementation because these names are already in use by the parent FiducialDetector instance.

Reimplemented in icl::markers::FiducialDetectorPluginForQuads.

virtual void icl::markers::FiducialDetectorPlugin::getKeyPoints2D ( std::vector< Fiducial::KeyPoint > &  dst,
FiducialImpl impl 
)
virtual

returns how to compute a list of image-position/marker-position correspondences

The 2D-keypoints are the most common information that is use to compute a markers 3D information. Each keypoint defines a 2D marker location in [mm] and a corresponding image location

Reimplemented in icl::markers::FiducialDetectorPluginICL1, and icl::markers::FiducialDetectorPluginForQuads.

virtual std::string icl::markers::FiducialDetectorPlugin::getName ( const FiducialImpl impl)
virtual

creates a human readable name for the given impl

Per default, this returns a string repesentation of the FiducialImpl's id

Reimplemented in icl::markers::FiducialDetectorPluginART.

virtual void icl::markers::FiducialDetectorPlugin::getPose3D ( geom::Mat dst,
FiducialImpl impl 
)
virtual

computes a markers 3D position and rotation euler angles

The defalut implementation uses getKeyPoints2D for planar pose estimation. If getKeyPoints is not implemented or if less than 4 key points are available, the default implementation for getCenter3D will not work Note: 3D information are usually only available if a camera was given to the parent FiducialDetector class

virtual SourceImageType icl::markers::FiducialDetectorPlugin::getPreProcessing ( ) const
inlinevirtual

returns Binary (as default)

Reimplemented in icl::markers::FiducialDetectorPluginForQuads.

virtual void icl::markers::FiducialDetectorPlugin::getRotation2D ( float &  dst,
FiducialImpl impl 
)
virtual

returns how to compute the markers 2D rotation

Reimplemented in icl::markers::FiducialDetectorPluginICL1, and icl::markers::FiducialDetectorPluginAmoeba.

virtual void icl::markers::FiducialDetectorPlugin::getRotation3D ( geom::Vec dst,
FiducialImpl impl 
)
virtual

computes a markers 3D rotation euler angles

The defalut implementation uses getKeyPoints2D for planar pose estimation. If getKeyPoints is not implemented or if less than 4 key points are available, the default implementation for getCenter3D will not work Note: 3D information are usually only available if a camera was given to the parent FiducialDetector class

static std::vector<int> icl::markers::FiducialDetectorPlugin::parse_list_str ( const utils::Any s)
static

parses an any instance that is either an int-value, or a range or a list of int-values

The core::format is "int" | or "{int,int,int}" etc. or "[min,max]"

Member Data Documentation

geom::Camera* icl::markers::FiducialDetectorPlugin::camera

Camera structure for 3D feature estimation.

The actual camera instance is managed by the parent FiducialDetector instance

geom::CoplanarPointPoseEstimator icl::markers::FiducialDetectorPlugin::poseEst

for 3D pose estimation


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