Image Component Library (ICL)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
icl::markers::MultiCamFiducialDetector Class Reference

Fiducial detector class that allows for using multiple cameras at once for fiducial detection. More...

#include <MultiCamFiducialDetector.h>

Inheritance diagram for icl::markers::MultiCamFiducialDetector:
icl::utils::Configurable

List of all members.

Public Member Functions

 MultiCamFiducialDetector ()
 creates an uninitialized instance
 MultiCamFiducialDetector (const std::string &pluginType, const utils::Any &markersToLoad, const utils::ParamList &params, const std::vector< geom::Camera * > &cams, bool syncProperties=true, bool deepCopyCams=false) throw (utils::ICLException)
 creates an initialized instance with given parameters
void init (const std::string &pluginType, const utils::Any &markersToLoad, const utils::ParamList &params, const std::vector< geom::Camera * > &cams, bool syncProperties=true, bool deepCopyCams=false) throw (utils::ICLException)
 (re-)initializes the detector with given parameters
const std::vector
< MultiCamFiducial > & 
detect (const std::vector< const core::ImgBase * > &images, int minCamsFound=1) throw (utils::ICLException)
 detects fiducials in all images and returns the combined results
int getNumCameras () const
 returns the internal number of cameras
const FiducialDetectorgetFiducialDetector (int idx) const
 returns the internal 2D FiducialDetector at given camera index
FiducialDetectorgetFiducialDetector (int idx)
 returns the internal 2D FiducialDetector at given camera index (const)
void loadMarkers (const utils::Any &which, const utils::ParamList &params) throw (utils::ICLException)
 loads additional markers (passed to all 2D detectors)
void unloadMarkers (const utils::Any &which)
 unloads markers (passed to all 2D detectors)
std::string getIntermediateImageNames () const
 provides a comma separated list of intermediate images
const core::ImgBasegetIntermediateImage (const std::string &name) const throw (utils::ICLException)
 returns a named intermeted image

Static Public Member Functions

static int getCameraIDFromIntermediteImageName (const std::string &name)
 extract the current camera from the given intermediate image name

Private Member Functions

void property_callback (const Property &p)
 internally used property callback

Private Attributes

Data * m_data
 internal data structure

Detailed Description

Fiducial detector class that allows for using multiple cameras at once for fiducial detection.

By using more than one camera at once, the 3D Pose estimation accurrace can be increased significantly. The MultiCamFiducialDetector detects Fiducials in several input images and uses corresponding camera calibration files to provide highly accurate 3D marker poses. If a fiducial is only detectable in a single camera image, single-camera pose-estimation is used automatically.

How it works

Internall, for each camera view, a dedicated FiducialDetector is instantiated. If a new set of input images is given, all of these FiducialDetectors are applied to the corresponding image. Then, the 2D fiducial detection results are sorted by marker ID and combined. A MultiCamFiducial with ID x combines all fiducials with ID x that were detection in all views

Restriction

Due to the fact, that the markers are combined by ID, It is not allowed to have several markers with Identical IDs in a scene. If you have, they will be mixed up and the resulting 3D pose estimation becomes completly wrong.

See also:
MultiCamFiducial
FiducialDetector

Constructor & Destructor Documentation

creates an uninitialized instance

icl::markers::MultiCamFiducialDetector::MultiCamFiducialDetector ( const std::string &  pluginType,
const utils::Any markersToLoad,
const utils::ParamList params,
const std::vector< geom::Camera * > &  cams,
bool  syncProperties = true,
bool  deepCopyCams = false 
) throw (utils::ICLException)

creates an initialized instance with given parameters

See also:
MultiCamFiducialDetector::init

Member Function Documentation

const std::vector<MultiCamFiducial>& icl::markers::MultiCamFiducialDetector::detect ( const std::vector< const core::ImgBase * > &  images,
int  minCamsFound = 1 
) throw (utils::ICLException)

detects fiducials in all images and returns the combined results

Please note, that images[i] must correspond to cams[i] in the constructor/init method

static int icl::markers::MultiCamFiducialDetector::getCameraIDFromIntermediteImageName ( const std::string &  name) [static]

extract the current camera from the given intermediate image name

returns the internal 2D FiducialDetector at given camera index

returns the internal 2D FiducialDetector at given camera index (const)

returns a named intermeted image

provides a comma separated list of intermediate images

The returned list can simply be added to a view-selection combo box. e.g.

          icl::markers::MultiCamFiducialDetector fd;
          fd.init(...); 
          gui << Combo(fd.getIntermediateImageNames()).label("current image").handle("vis")
              << Draw3D().handle("image")
              << Show();
          ...
          gui["image"] = fd.getIntermediateImage( gui["vis"] );
          gui["image"].render();
          

returns the internal number of cameras

void icl::markers::MultiCamFiducialDetector::init ( const std::string &  pluginType,
const utils::Any markersToLoad,
const utils::ParamList params,
const std::vector< geom::Camera * > &  cams,
bool  syncProperties = true,
bool  deepCopyCams = false 
) throw (utils::ICLException)

(re-)initializes the detector with given parameters

Parameters:
pluginTypethis option directly passed to all internal 2D FiducialDetector instances
markersToLoadthis option directly passed to all internal 2D FiducialDetector instances
paramsthis option directly passed to all internal 2D FiducialDetector instances
camsContains the list of calibrated cameras. Please note that cams[i] must belong to images[i] in the MultiCamFiducialDetector::detect method
syncPropertiesif this is set to false, each internal 2D FiducialDetector get's its own property list. If syncProperties is true (default), the 2D FiducialDetector properties are synchronized internally
deepCopyCamsby default, the given cameras are just copied shallowly (by pointer) if the cameras are moved at runtime, and the MultiCamFiducialDetector shall use the adapted camera parameters then, deepCopyCams must be left false (default) Please Note: you can obtain all cameras of a scene using Scene::getAllCameras()

loads additional markers (passed to all 2D detectors)

internally used property callback

unloads markers (passed to all 2D detectors)


Member Data Documentation

internal data structure

internal data pointer


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines