31 #include <visp3/rbt/vpRBDenseDepthTracker.h>
32 #include <visp3/core/vpMeterPixelConversion.h>
33 #include <visp3/core/vpDisplay.h>
39 const double r =
static_cast<double>(v.
R), g =
static_cast<double>(v.
G), b =
static_cast<double>(v.
B);
40 const double *R = cRo.
data;
41 res[0] = R[0] * r + R[1] * g + R[2] * b;
42 res[1] = R[3] * r + R[4] * g + R[5] * b;
43 res[2] = R[6] * r + R[7] * g + R[8] * b;
48 const double *T = oTc.
data;
49 p.
set_oX(T[0] * X + T[1] * Y + T[2] * Z + T[3]);
50 p.
set_oY(T[4] * X + T[5] * Y + T[6] * Z + T[7]);
51 p.
set_oZ(T[8] * X + T[9] * Y + T[10] * Z + T[11]);
67 for (
unsigned int i =
static_cast<unsigned int>(bb.
getTop()); i <
static_cast<unsigned int>(bb.
getBottom()); i +=
m_step) {
68 for (
unsigned int j =
static_cast<unsigned int>(bb.
getLeft()); j <
static_cast<unsigned int>(bb.
getRight()); j +=
m_step) {
70 double Z = renderDepth[i][j];
71 double currZ = depthMap[i][j];
72 if (Z > 0.f && currZ > 0.f) {
76 double x = 0.0, y = 0.0;
90 fastProjection(oMc, x * Z, y * Z, Z, point.
oP);
128 #ifdef VISP_HAVE_OPENMP
129 #pragma omp parallel for
133 depthPoint.
update(cMo, cRo);
144 for (
unsigned int dof = 0; dof < 6; ++dof) {
Type * data
Address of the first element of the data array.
void resize(unsigned int nrows, unsigned int ncols, bool flagNullify=true, bool recopy_=true)
unsigned int getRows() const
Generic class defining intrinsic camera parameters.
Implementation of column vector and the associated operations.
void resize(unsigned int i, bool flagNullify=true)
Class to define RGB colors available for display functionalities.
static void displayPoint(const vpImage< unsigned char > &I, const vpImagePoint &ip, const vpColor &color, unsigned int thickness=1)
Implementation of an homogeneous matrix and operations on such kind of matrices.
vpRotationMatrix getRotationMatrix() const
vpHomogeneousMatrix inverse() const
void set_ij(double ii, double jj)
static void convertPoint(const vpCameraParameters &cam, const double &u, const double &v, double &x, double &y)
Class that defines a 3D point in the object frame and allows forward projection of a 3D point in the ...
void set_oW(double oW)
Set the point oW coordinate in the object frame.
void set_oY(double oY)
Set the point oY coordinate in the object frame.
void set_oZ(double oZ)
Set the point oZ coordinate in the object frame.
void set_oX(double oX)
Set the point oX coordinate in the object frame.
void display(const vpCameraParameters &cam, const vpImage< unsigned char > &I, const vpImage< vpRGBa > &IRGB, const vpImage< unsigned char > &depth) const VP_OVERRIDE
std::vector< vpDepthPoint > m_depthPoints
float m_minMaskConfidence
void computeVVSIter(const vpRBFeatureTrackerInput &frame, const vpHomogeneousMatrix &cMo, unsigned int iteration) VP_OVERRIDE
void extractFeatures(const vpRBFeatureTrackerInput &frame, const vpRBFeatureTrackerInput &previousFrame, const vpHomogeneousMatrix &cMo) VP_OVERRIDE
Extract features from the frame data and the current pose estimate.
vpColVector m_weights
Weighted VS error.
vpMatrix m_LTL
Error jacobian (In VS terms, the interaction matrix)
vpColVector m_covWeightDiag
Covariance matrix.
vpColVector m_LTR
Left side of the Gauss newton minimization.
static void computeJTR(const vpMatrix &interaction, const vpColVector &error, vpColVector &JTR)
bool m_vvsConverged
User-defined weight for this specific type of feature.
unsigned m_numFeatures
Error weights.
vpColVector m_weighted_error
Raw VS Error vector.
vpMatrix m_cov
Right side of the Gauss Newton minimization.
Defines a rectangle in the plane.
@ TUKEY
Tukey influence function.
void MEstimator(const vpRobustEstimatorType method, const vpColVector &residues, vpColVector &weights)
Implementation of a rotation matrix and operations on such kind of matrices.
void update(const vpHomogeneousMatrix &cMo, const vpRotationMatrix &cRo)
void error(vpColVector &e, unsigned i) const
void interaction(vpMatrix &L, unsigned i)
vpImage< float > depth
Image containing the per-pixel normal vector (RGB, in object space)
vpImage< vpRGBf > normals