Image Component Library (ICL)
|
Classes | |
struct | icl::markers::FiducialDetectorPlugin |
Generic Interface class for FiducialDetector plugins. More... | |
class | icl::markers::FiducialDetectorPluginAmoeba |
FiducialDetectorPlugin for reacTIVision's 'amoeba' markers. More... | |
class | icl::markers::FiducialDetectorPluginART |
FiducialDetectorPlugin for ARToolkit like markers using binary image patches as marker IDs. More... | |
class | icl::markers::FiducialDetectorPluginBCH |
FiducialDetectorPlugin for ARToolkit+ like markers using BCH coded IDs. More... | |
class | icl::markers::FiducialDetectorPluginForQuads |
FiducialDetectorPlugin for quad-markers like ARToolkit and BCH-Code markers. More... | |
class | icl::markers::FiducialDetectorPluginHierarchical |
Extra abstraction layer that defines a basic skeleton for the detection of hierarchical fiducials. More... | |
class | icl::markers::FiducialDetectorPluginICL1 |
FiducialDetectorPlugin for ARToolkit+ like markers using BCH coded IDs. More... |
The ICLMarkers package defines general interfaces for most different types of marker detection methods. The essential classes of this package are
Note: We use the words "fiducial" and "marker" or "image marker" as synonyms.
The FiducialDetector implements a plugin-based system which can be configured at instantiation type in order to use a certain marker detection backend. Dependent on the selected backend, the detection markers (of type icl::Fiducial) provide a different set of information -- some can only provide 2D information, others do also provide 3D pose information. Also dependent on the chosen plugin type, markers have to be loaded in a certain way that is also generalized by single method FiducialDetector::loadMarkers.
Internally, most detection steps are optimized for beeing fast on large images (>= VGA resolution),i.e. usually the plugins try to get away from the pixel representation by switching to binarized image regions. Benchmarks for different types of input image sizes and marker types are given in the Benchmarks section
"art" marker | "bch" marker | "amoeba" marker | "icl1" marker |
TODO
We did not speed up the algorithms using multithreading techniques since usually the provided methods are fast enough using a single thread. "Fast enough" means, that the detection is faster than the amount of data, that is usually provided by common cameras. Perhaps, multithreading will added later as a 'utils::Configurable' property.
#include <ICLQt/Common.h> #include <ICLMarkers/FiducialDetector.h> // static application data HSplit hsplit; GUI gui(hsplit); GenericGrabber grabber; // the global detector class // here, using the first 100 "bch"-markers icl::markers::FiducialDetector fid("bch","[0-100]","size=30x30"); // initialization function (called once after start) void init(){ // the the configurable ID fid.setConfigurableID("fid"); // create the GUI gui << Draw().handle("draw") // create drawing component << Prop("fid").maxSize(18,100) // create the propery widged for 'fid' << Show(); // show the main widget // initialize the grabber from given program argument grabber.init(pa("-input")); } // working loop (automatically looped in the working thread) void run(){ // get a handle to the "draw" component static DrawHandle draw = gui["draw"]; // grab the next image const core::ImgBase *image = grabber.grab(); // detect markers const std::vector<Fiducial> &fids = fid.detect(image); // visualize the image draw = image; // draw marker detection results draw->linewidth(2); for(unsigned int i=0;i<fids.size();++i){ utils::Point32f c = fids[i].getCenter2D(); float rot = fids[i].getRotation2D(); draw->color(0,100,255,255); draw->text(fids[i].getName(),c.x,c.y,10); draw->color(0,255,0,255); draw->line(c,c+utils::Point32f( cos(rot), sin(rot))*100 ); draw->color(255,0,0,255); draw->linestrip(fids[i].getCorners2D()); } // update the visualization draw.render(); } // main method int main(int n, char **ppc){ return ICLApp(n,ppc,"[m]-input|-i(2)",init,run).exec(); }