36 #ifndef _vpMbDepthNormalTracker_h_
37 #define _vpMbDepthNormalTracker_h_
39 #include <visp3/core/vpConfig.h>
40 #include <visp3/core/vpPlane.h>
41 #include <visp3/mbt/vpMbTracker.h>
42 #include <visp3/mbt/vpMbtFaceDepthNormal.h>
44 #if DEBUG_DISPLAY_DEPTH_NORMAL
45 #include <visp3/core/vpDisplay.h>
55 const vpColor &col,
unsigned int thickness = 1,
bool displayFullModel =
false);
58 const vpColor &col,
unsigned int thickness = 1,
bool displayFullModel =
false);
62 return m_depthNormalFeatureEstimationMethod;
67 virtual std::vector<std::vector<double> >
getModelForDisplay(
unsigned int width,
unsigned int height,
70 bool displayFullModel =
false);
76 virtual void loadConfigFile(
const std::string &configFile,
bool verbose =
true);
79 bool verbose =
false);
80 #if defined(VISP_HAVE_PCL)
81 void reInitModel(
const pcl::PointCloud<pcl::PointXYZ>::ConstPtr &point_cloud,
const std::string &cad_name,
93 virtual void setDepthNormalPclPlaneEstimationMethod(
int method);
95 virtual void setDepthNormalPclPlaneEstimationRansacMaxIter(
int maxIter);
97 virtual void setDepthNormalPclPlaneEstimationRansacThreshold(
double thresold);
99 virtual void setDepthNormalSamplingStep(
unsigned int stepX,
unsigned int stepY);
107 #if defined(VISP_HAVE_PCL)
113 void setUseDepthNormalTracking(
const std::string &name,
const bool &useDepthNormalTracking);
119 #if defined(VISP_HAVE_PCL)
120 virtual void track(
const pcl::PointCloud<pcl::PointXYZ>::ConstPtr &point_cloud);
122 virtual void track(
const std::vector<vpColVector> &point_cloud,
unsigned int width,
unsigned int height);
159 #if DEBUG_DISPLAY_DEPTH_NORMAL
166 void computeVisibility(
unsigned int width,
unsigned int height);
172 virtual std::vector<std::vector<double> > getFeaturesForDisplayDepthNormal();
175 const std::string &name =
"");
178 const std::string &name =
"");
185 void segmentPointCloud(
const pcl::PointCloud<pcl::PointXYZ>::ConstPtr &point_cloud);
187 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 functionnalities.
Class that defines generic functionnalities 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.
virtual vpColVector getError() const
vpMbtFaceDepthNormal::vpFeatureEstimationType m_depthNormalFeatureEstimationMethod
Method to estimate the desired features.
virtual vpColVector getRobustWeights() const
std::vector< vpMbtFaceDepthNormal * > m_depthNormalFaces
List of faces.
int m_depthNormalPclPlaneEstimationRansacMaxIter
PCL RANSAC maximum number of iterations.
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.