SaDVIO
|
A class to build and update a 3D mesh from 2D features and landmarks. More...
#include <mesh.h>
Public Member Functions | |
Mesh3D ()=default | |
Mesh3D (double ZNCC_tsh, double max_length_tsh) | |
~Mesh3D ()=default | |
std::vector< std::shared_ptr< Polygon > > | getPolygonVector () const |
std::vector< Eigen::Vector3d > | getPointCloud () const |
std::shared_ptr< Frame > | getFrame () const |
std::unordered_map< std::shared_ptr< ALandmark >, std::shared_ptr< Vertex > > | getMap () |
void | updateMesh (std::vector< FeatPolygon > feats_polygon, std::shared_ptr< Frame > frame) |
Update the 3D mesh with a 2D Mesh of features for a given frame. More... | |
bool | checkTriangle (std::vector< std::shared_ptr< Vertex >> vertices) |
Check if a triangle is valid. (i.e. no accute angles or too long edges) More... | |
bool | checkPolygon (std::shared_ptr< Polygon > polygon) |
Photometric check of a polygon using ZNCC on a patch on the barycenter of the polygon. More... | |
bool | checkPolygonArea (std::shared_ptr< Polygon > polygon, double area2d) |
EXPERIMENTAL Photometric check of a polygon using ZNCC on a patch on the barycenter of the polygon of a given 2D area. More... | |
bool | checkPolygonTri (std::shared_ptr< Polygon > polygon3d, FeatPolygon polygon2d) |
EXPERIMENTAL Photometric check of a polygon using ZNCC on a patch with the full 2D polygon in it. More... | |
void | removePolygon (std::shared_ptr< Polygon > polygon) |
void | analysePolygon (std::shared_ptr< Polygon > polygon) |
Compute the barycenter and the normal of a polygon. More... | |
void | filterMesh () |
Remove polygon outliers from the 3D mesh. More... | |
void | projectMesh () |
Project the mesh on camera 0 of the current frame for raycasting. More... | |
void | generatePointCloud () |
Generate a point cloud from the mesh with raycasting. More... | |
Public Attributes | |
std::mutex | _mesh_mtx |
std::mutex | _pc_mtx |
A class to build and update a 3D mesh from 2D features and landmarks.
It saves all the usefull variables of the current frame used to build / update the mesh. The Mesh data structure is pretty naive for now: it is a vector of polygons where each polygon is a vector of vertices. There is room for improvement here. Moreover, it contains all the methods to filter the mesh and to perform raycasting on it.
|
default |
|
inline |
|
default |
void isae::Mesh3D::analysePolygon | ( | std::shared_ptr< Polygon > | polygon | ) |
Compute the barycenter and the normal of a polygon.
bool isae::Mesh3D::checkPolygon | ( | std::shared_ptr< Polygon > | polygon | ) |
Photometric check of a polygon using ZNCC on a patch on the barycenter of the polygon.
bool isae::Mesh3D::checkPolygonArea | ( | std::shared_ptr< Polygon > | polygon, |
double | area2d | ||
) |
EXPERIMENTAL Photometric check of a polygon using ZNCC on a patch on the barycenter of the polygon of a given 2D area.
bool isae::Mesh3D::checkPolygonTri | ( | std::shared_ptr< Polygon > | polygon3d, |
FeatPolygon | polygon2d | ||
) |
EXPERIMENTAL Photometric check of a polygon using ZNCC on a patch with the full 2D polygon in it.
bool isae::Mesh3D::checkTriangle | ( | std::vector< std::shared_ptr< Vertex >> | vertices | ) |
Check if a triangle is valid. (i.e. no accute angles or too long edges)
void isae::Mesh3D::filterMesh | ( | ) |
Remove polygon outliers from the 3D mesh.
void isae::Mesh3D::generatePointCloud | ( | ) |
Generate a point cloud from the mesh with raycasting.
|
inline |
|
inline |
|
inline |
|
inline |
void isae::Mesh3D::projectMesh | ( | ) |
Project the mesh on camera 0 of the current frame for raycasting.
|
inline |
void isae::Mesh3D::updateMesh | ( | std::vector< FeatPolygon > | feats_polygon, |
std::shared_ptr< Frame > | frame | ||
) |
Update the 3D mesh with a 2D Mesh of features for a given frame.
feats_polygon | A vector of features to build the mesh. |
frame | A shared pointer to the frame containing the features. |
|
mutable |
|
mutable |