31#include <visp3/rbt/vpRBFeatureTrackerFactory.h>
33#include <visp3/rbt/vpRBKltTracker.h>
34#include <visp3/rbt/vpRBSilhouetteCCDTracker.h>
35#include <visp3/rbt/vpRBSilhouetteMeTracker.h>
36#include <visp3/rbt/vpRBDenseDepthTracker.h>
44vpRBFeatureTrackerFactory::vpRBFeatureTrackerFactory()
46#ifdef VISP_HAVE_NLOHMANN_JSON
51 registerType(
"silhouetteMe", [](
const nlohmann::json &j) {
52 std::shared_ptr<vpRBSilhouetteMeTracker>
p(
new vpRBSilhouetteMeTracker());
53 p->loadJsonConfiguration(j);
56 registerType(
"silhouetteColor", [](
const nlohmann::json &j) {
57 std::shared_ptr<vpRBSilhouetteCCDTracker>
p(
new vpRBSilhouetteCCDTracker());
58 p->loadJsonConfiguration(j);
62 std::shared_ptr<vpRBDenseDepthTracker>
p(
new vpRBDenseDepthTracker());
63 p->loadJsonConfiguration(j);
66#if defined(VP_HAVE_RB_KLT_TRACKER)
68 std::shared_ptr<vpRBKltTracker>
p(
new vpRBKltTracker());
69 p->loadJsonConfiguration(j);
Factory-type class that allows for the dynamic registration of subclasses.
void setJsonKeyFinder(const std::function< std::string(const nlohmann::json &)> &finderFn)
void registerType(const std::string &key, const std::function< std::shared_ptr< vpRBFeatureTracker >(const nlohmann::json &)> &function)