34 #ifndef _vpMbDepthNormalTracker_h_
35 #define _vpMbDepthNormalTracker_h_
37 #include <visp3/core/vpConfig.h>
38 #include <visp3/core/vpPlane.h>
39 #include <visp3/mbt/vpMbTracker.h>
40 #include <visp3/mbt/vpMbtFaceDepthNormal.h>
42 #if DEBUG_DISPLAY_DEPTH_NORMAL
43 #include <visp3/core/vpDisplay.h>
53 const vpColor &col,
unsigned int thickness = 1,
bool displayFullModel =
false)
override;
56 const vpColor &col,
unsigned int thickness = 1,
bool displayFullModel =
false)
override;
60 return m_depthNormalFeatureEstimationMethod;
65 virtual std::vector<std::vector<double> >
getModelForDisplay(
unsigned int width,
unsigned int height,
68 bool displayFullModel =
false)
override;
74 virtual void loadConfigFile(
const std::string &configFile,
bool verbose =
true)
override;
77 bool verbose =
false);
78 #if defined(VISP_HAVE_PCL)
79 void reInitModel(
const pcl::PointCloud<pcl::PointXYZ>::ConstPtr &point_cloud,
const std::string &cad_name,
91 virtual void setDepthNormalPclPlaneEstimationMethod(
int method);
93 virtual void setDepthNormalPclPlaneEstimationRansacMaxIter(
int maxIter);
95 virtual void setDepthNormalPclPlaneEstimationRansacThreshold(
double thresold);
97 virtual void setDepthNormalSamplingStep(
unsigned int stepX,
unsigned int stepY);
105 #if defined(VISP_HAVE_PCL)
111 void setUseDepthNormalTracking(
const std::string &name,
const bool &useDepthNormalTracking);
117 #if defined(VISP_HAVE_PCL)
118 virtual void track(
const pcl::PointCloud<pcl::PointXYZ>::ConstPtr &point_cloud);
120 virtual void track(
const std::vector<vpColVector> &point_cloud,
unsigned int width,
unsigned int height);
157 #if DEBUG_DISPLAY_DEPTH_NORMAL
164 void computeVisibility(
unsigned int width,
unsigned int height);
170 virtual std::vector<std::vector<double> > getFeaturesForDisplayDepthNormal();
173 const std::string &name =
"")
override;
176 const std::string &name =
"")
override;
183 void segmentPointCloud(
const pcl::PointCloud<pcl::PointXYZ>::ConstPtr &point_cloud);
185 void segmentPointCloud(
const std::vector<vpColVector> &point_cloud,
unsigned int width,
unsigned int height);
Generic class defining intrinsic camera parameters.
Implementation of column vector and the associated operations.
Class to define RGB colors available for display functionalities.
Class that defines generic functionalities for display.
Implementation of an homogeneous matrix and operations on such kind of matrices.
Implementation of a matrix and operations on matrices.
vpMatrix m_L_depthNormal
Interaction matrix.
vpRobust m_robust_depthNormal
Robust.
vpMbtFaceDepthNormal::vpFeatureEstimationType m_depthNormalFeatureEstimationMethod
Method to estimate the desired features.
virtual vpColVector getError() const override
std::vector< vpMbtFaceDepthNormal * > m_depthNormalFaces
List of faces.
int m_depthNormalPclPlaneEstimationRansacMaxIter
PCL RANSAC maximum number of iterations.
virtual vpColVector getRobustWeights() const override
unsigned int m_depthNormalSamplingStepY
Sampling step in y-direction.
double m_depthNormalPclPlaneEstimationRansacThreshold
PCL RANSAC threshold.
bool m_depthNormalUseRobust
If true, use Tukey robust M-Estimator.
vpColVector m_w_depthNormal
Robust weights.
vpColVector m_error_depthNormal
(s - s*)
vpColVector m_weightedError_depthNormal
Weighted error.
std::vector< vpMbtFaceDepthNormal * > m_depthNormalListOfActiveFaces
List of current active (visible and with features extracted) faces.
int m_depthNormalPclPlaneEstimationMethod
PCL plane estimation method.
std::vector< vpColVector > m_depthNormalListOfDesiredFeatures
List of desired features.
vpMbHiddenFaces< vpMbtPolygon > m_depthNormalHiddenFacesDisplay
Set of faces describing the object used only for display with scan line.
virtual vpMbtFaceDepthNormal::vpFeatureEstimationType getDepthFeatureEstimationMethod() const
std::vector< std::vector< double > > m_featuresToBeDisplayedDepthNormal
Display features.
unsigned int m_depthNormalSamplingStepX
Sampling step in x-direction.
Main methods for a model-based tracker.
virtual void track(const vpImage< unsigned char > &I)=0
virtual void resetTracker()=0
virtual void init(const vpImage< unsigned char > &I)=0
virtual std::vector< std::vector< double > > getModelForDisplay(unsigned int width, unsigned int height, const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam, bool displayFullModel=false)=0
virtual void initFaceFromLines(vpMbtPolygon &polygon)=0
virtual void initCircle(const vpPoint &p1, const vpPoint &p2, const vpPoint &p3, double radius, int idFace=0, const std::string &name="")=0
virtual void initCylinder(const vpPoint &p1, const vpPoint &p2, double radius, int idFace=0, const std::string &name="")=0
virtual void setCameraParameters(const vpCameraParameters &cam)
virtual void setScanLineVisibilityTest(const bool &v)
virtual void setOgreVisibilityTest(const bool &v)
virtual void setPose(const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cdMo)=0
virtual void computeVVSInteractionMatrixAndResidu()=0
virtual void display(const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam, const vpColor &col, unsigned int thickness=1, bool displayFullModel=false)=0
virtual void computeVVSInit()=0
virtual void testTracking()=0
virtual void initFaceFromCorners(vpMbtPolygon &polygon)=0
virtual void loadConfigFile(const std::string &configFile, bool verbose=true)
Implementation of a polygon of the model used by the model-based tracker.
Class that defines a 3D point in the object frame and allows forward projection of a 3D point in the ...
Contains an M-estimator and various influence function.