Image Component Library (ICL)
|
Generic Interface class for FiducialDetector plugins. More...
#include <FiducialDetectorPlugin.h>
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 ¶ms)=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::ImgBase * | getIntermediateImage (const std::string &name) const |
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... | |
Configurable & | operator= (const Configurable &other) |
Assignment operator. More... | |
void | setConfigurableID (const std::string &ID) |
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) |
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) |
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 Configurable * | get (const std::string &id) |
returns configurable by given ID More... | |
static void | register_configurable_type (const std::string &classname, Function< Configurable * > creator) |
registers a configurable type More... | |
static std::vector< std::string > | get_registered_configurables () |
returns a list of all registered configurable classnames More... | |
static Configurable * | create_configurable (const std::string &classname) |
creates a configurable by given name More... | |
Public Attributes | |
geom::Camera * | camera |
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()) |
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... | |
Property & | prop (const std::string &propertyName) |
this CAN be used e.g. to store a property value in internal property-list More... | |
const Property & | prop (const std::string &propertyName) const |
this CAN be used e.g. to store a property value in internal property-list More... | |
Configurable (const std::string &ID="", bool ordered=true) | |
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< Callback > | callbacks |
internally managed list of callbacks More... | |
Generic Interface class for FiducialDetector plugins.
icl::markers::FiducialDetectorPlugin::FiducialDetectorPlugin | ( | ) |
initializes the plugin with a 0-camera
|
inlinevirtual |
virtual Destructor
|
pure virtual |
defines how to load/remove marker definitions
Implemented in icl::markers::FiducialDetectorPluginForQuads, icl::markers::FiducialDetectorPluginICL1, icl::markers::FiducialDetectorPluginART, icl::markers::FiducialDetectorPluginAmoeba, icl::markers::FiducialDetectorPluginBCH, and icl::markers::FiducialDetectorPluginHierarchical.
|
inlinevirtual |
interface for creating an image of a specific marker
Reimplemented in icl::markers::FiducialDetectorPluginART, icl::markers::FiducialDetectorPluginICL1, and icl::markers::FiducialDetectorPluginBCH.
|
pure virtual |
defines how to detect markers from a given image
Implemented in icl::markers::FiducialDetectorPluginForQuads, and icl::markers::FiducialDetectorPluginHierarchical.
|
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 |
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 |
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.
|
pure virtual |
defines which features are supported
Implemented in icl::markers::FiducialDetectorPluginICL1, icl::markers::FiducialDetectorPluginForQuads, icl::markers::FiducialDetectorPluginAmoeba, and icl::markers::FiducialDetectorPluginHierarchical.
|
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.
|
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 |
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 |
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 |
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
|
inlinevirtual |
returns Binary (as default)
Reimplemented in icl::markers::FiducialDetectorPluginForQuads.
|
virtual |
returns how to compute the markers 2D rotation
Reimplemented in icl::markers::FiducialDetectorPluginICL1, and icl::markers::FiducialDetectorPluginAmoeba.
|
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 |
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]"
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