24 using Eigen::MatrixXf;
25 using Eigen::MatrixXi;
118 void filterAndDownsample();
121 void calculateCoord();
124 void calculateDepthDerivatives();
127 void findNullPoints();
133 void findValidPoints();
137 void solveDepthSystem();
140 virtual void filterSpeedAndPoseUpdate();
175 void OdometryCalculation();
178 inline void setCameraFocalLenght(
float new_f);
184 inline void setNumberOfRowsAndCols(
unsigned int num_rows,
unsigned int num_cols);
187 inline void getRowsAndCols(
unsigned int &num_rows,
unsigned int &num_cols)
const {num_rows = rows; num_cols = cols;}
190 inline void setFOV(
float new_fovh,
float new_fovv);
193 inline void getFOV(
float &cur_fovh,
float &cur_fovv)
const {cur_fovh = 57.296*fovh; cur_fovv = 57.296*fovv;}
208 inline void getPointsCoord(MatrixXf &x, MatrixXf &y, MatrixXf &z);
211 inline void getDepthDerivatives(MatrixXf &cur_du, MatrixXf &cur_dv, MatrixXf &cur_dt);
223 inline void getWeights(MatrixXf &we);
226 void bordersThresholdToDefault();
230 virtual void loadFrame() = 0;
float previous_speed_const_weight
Speed filter parameters: Previous_speed_const_weight directly ponders the previous speed in order to ...
float fps
Frames per second (Hz)
unsigned int gaussian_mask_size
Size (rows) of the gaussian kernel used to filter the depth image.
float previous_speed_eig_weight
Default 300.
float y_incr
Separation between pixels (rows) in the sensor array (meters)
MatrixXf du
Matrices that store the depth derivatives.
mrpt::math::CMatrixFloat66 getCovariance() const
It gets the least-square covariance matrix.
mrpt::math::CMatrixFloat61 getLastSpeedAbs() const
It gets the last camera speed (vx, vy, vz, wx, wy, wz) expressed in the world reference frame...
unsigned int rows
Number of rows and cols of the depth image that will be considered by the visual odometry method...
float lens_disp
Camera properties.
MatrixXi null
Matrix which indicates wheter the depth of a pixel is zero (null = 1) or not (null = 00)...
MatrixXi border
Matrix which indicates wheter a point is in a border or has an inaccurate depth (border =1...
float getCameraFocalLenght() const
It gets the camera focal lenght.
float difuv_surroundings
Threshold to the difference of (du,dv) at a pixel and the values of (du,dv) at its surroundings...
CPose3D cam_pose
Camera poses.
float execution_time
Execution time (ms)
float dif_threshold
Threshold to [abs(final_dx-ini_dx) + abs(final_dy-ini_dy)].
void getRowsAndCols(unsigned int &num_rows, unsigned int &num_cols) const
It gets the rows and cols of the depth image that are considered by the visual odometry method...
A numeric matrix of compile-time fixed size.
math::CMatrixFloat66 est_cov
Least squares covariance matrix.
math::CMatrixFloat61 kai_abs
Last filtered speed in absolute coordinates.
mrpt::math::CMatrixFloat61 getSolverSolution() const
It gets the camera speed (vx, vy, vz, wx, wy, wz) expressed in local reference frame estimated by the...
This abstract class implements a method called "Difodo" to perform Visual odometry with range cameras...
void getFOV(float &cur_fovh, float &cur_fovv) const
It gets the horizontal and vertical field of vision (in degrees)
float x_incr
Separation between pixels (cols) in the sensor array (meters)
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
MatrixXf depth
Matrices that store the point coordinates after downsampling.
MatrixXf weights
Weights used to ponder equations in the least square solution.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
unsigned int num_valid_points
Num of valid points after removing null pixels and borders.
CPose3D cam_oldpose
Previous camera pose.
float dt_threshold
Threshold to dt.
float dift_surroundings
Threshold to the difference of dt at a pixel and the value of dt at its surroundings.
float fovh
Horizontal field of view (rad)
void setSpeedFilterConstWeight(float new_cweight)
It sets the weight that ponders the previous speed in order to calculate the filtered speed...
void setSpeedFilterEigWeight(float new_eweight)
It sets the weight that ponders the product of the corresponding eigenvalue and the previous speed in...
float getSpeedFilterConstWeight() const
It gets the weight that ponders the previous speed in order to calculate the filtered speed...
float fovv
Vertical field of view (rad)
unsigned int downsample
Downsample the image taken by the range camera.
float duv_threshold
Thresholds used to remove borders and noisy points.
math::CMatrixFloat61 kai_solver
Solution from the solver: kai before applying the filter in local coordinates.
MatrixXf depth_ft
Matrices that store the original and filtered depth frames with the image resolution.
float getSpeedFilterEigWeight() const
It gets the weight that ponders the product of the corresponding eigenvalue and the previous speed in...
unsigned int cam_mode
Resolution of the images taken by the range camera.
float f_dist
Camera properties: