35 #ifndef VP_RB_TRACKER_H
36 #define VP_RB_TRACKER_H
38 #include <visp3/core/vpConfig.h>
40 #if defined(VISP_HAVE_PANDA3D)
42 #include <visp3/rbt/vpRBFeatureTracker.h>
43 #include <visp3/rbt/vpRBSilhouettePointsExtractionSettings.h>
44 #include <visp3/rbt/vpPanda3DDepthFilters.h>
45 #include <visp3/rbt/vpObjectCentricRenderer.h>
46 #include <visp3/rbt/vpRBTrackerLogger.h>
48 #include <visp3/core/vpDisplay.h>
52 #if defined(VISP_HAVE_NLOHMANN_JSON)
53 #include VISP_NLOHMANN_JSON(json_fwd.hpp)
95 void addTracker(std::shared_ptr<vpRBFeatureTracker> tracker);
96 void setupRenderer(
const std::string &file);
98 void setModelPath(
const std::string &path);
110 return m_depthSilhouetteSettings;
129 m_vvsIterations = iters;
147 m_muIterFactor = factor;
153 m_driftDetector = detector;
165 m_odometry = odometry;
186 #if defined(VISP_HAVE_NLOHMANN_JSON)
187 void loadConfigurationFile(
const std::string &filename);
188 void loadConfiguration(
const nlohmann::json &j);
201 void startTracking();
219 #ifdef VISP_HAVE_MODULE_GUI
228 std::vector<vpRBSilhouettePoint> extractSilhouettePoints(
236 if (I.
getRows() != m_imageHeight || I.
getCols() != m_imageWidth) {
237 std::stringstream ss;
238 ss <<
"vpRBTracker: dimension error: expected " << imgType;
239 ss <<
" image to have the following resolution " << m_imageWidth <<
" x " << m_imageHeight;
Generic class defining intrinsic camera parameters.
error that can be emitted by ViSP classes.
@ badValue
Used to indicate that a value is not in the allowed range.
@ dimensionError
Bad dimension.
Implementation of an homogeneous matrix and operations on such kind of matrices.
unsigned int getCols() const
unsigned int getRows() const
Implementation of a matrix and operations on matrices.
Single object focused renderer.
Rendering parameters for a panda3D simulation.
Base interface for algorithms that should detect tracking drift for the render-based tracker.
const vpRBTrackerLogger & getLogger() const
std::shared_ptr< vpRBDriftDetector > m_driftDetector
std::shared_ptr< vpRBVisualOdometry > m_odometry
vpSilhouettePointsExtractionSettings m_depthSilhouetteSettings
Factor with which to multiply mu at every iteration during VVS.
void checkDimensionsOrThrow(const vpImage< T > &I, const std::string &imgType) const
double getOptimizationInitialMu() const
vpObjectCentricRenderer m_renderer
unsigned int getImageWidth() const
std::shared_ptr< vpRBVisualOdometry > getOdometryMethod() const
unsigned m_vvsIterations
VVS gain.
vpRBTrackerLogger m_logger
Color and render image dimensions.
void setVerbose(bool verbose)
double m_muIterFactor
Initial mu value for Levenberg-Marquardt.
std::vector< std::shared_ptr< vpRBFeatureTracker > > m_trackers
Whether this is the first iteration.
vpPanda3DRenderParameters m_rendererSettings
double getOptimizationMuIterFactor() const
std::shared_ptr< vpObjectMask > getObjectSegmentationMethod() const
std::shared_ptr< vpObjectMask > m_mask
vpHomogeneousMatrix m_cMoPrev
void setDriftDetector(const std::shared_ptr< vpRBDriftDetector > &detector)
vpRBFeatureTrackerInput m_currentFrame
List of trackers.
const vpRBFeatureTrackerInput & getMostRecentFrame() const
void setOdometryMethod(const std::shared_ptr< vpRBVisualOdometry > &odometry)
unsigned int getImageHeight() const
double getOptimizationGain() const
vpRBFeatureTrackerInput m_previousFrame
std::shared_ptr< vpRBDriftDetector > getDriftDetector() const
unsigned int getMaxOptimizationIters() const
std::vector< std::shared_ptr< vpRBFeatureTracker > > getFeatureTrackers()
void setOptimizationMuIterFactor(double factor)
void setOptimizationInitialMu(double mu)
void setOptimizationGain(double lambda)
double m_muInit
Max number of VVS iterations.
std::string getModelPath() const
vpSilhouettePointsExtractionSettings getSilhouetteExtractionParameters() const
void setObjectSegmentationMethod(const std::shared_ptr< vpObjectMask > &mask)
vpHomogeneousMatrix m_cMo
void setMaxOptimizationIters(unsigned int iters)