Namespaces | Functions
util3d_surface.cpp File Reference
#include "rtabmap/core/util3d_surface.h"
#include "rtabmap/core/util3d_filtering.h"
#include "rtabmap/core/util3d.h"
#include "rtabmap/core/util2d.h"
#include "rtabmap/core/Memory.h"
#include "rtabmap/core/DBDriver.h"
#include "rtabmap/core/Compression.h"
#include "rtabmap/utilite/ULogger.h"
#include "rtabmap/utilite/UDirectory.h"
#include "rtabmap/utilite/UConversion.h"
#include "rtabmap/utilite/UMath.h"
#include "rtabmap/utilite/UTimer.h"
#include <opencv2/core/core_c.h>
#include <opencv2/imgproc/types_c.h>
#include <pcl/search/kdtree.h>
#include <pcl/surface/gp3.h>
#include <pcl/features/normal_3d_omp.h>
#include <pcl/surface/mls.h>
#include <pcl18/surface/texture_mapping.h>
#include <pcl/features/integral_image_normal.h>
#include <pcl/surface/vtk_smoothing/vtk_mesh_quadric_decimation.h>
#include <pcl/surface/organized_fast_mesh.h>
#include <pcl/surface/impl/marching_cubes.hpp>
#include <pcl/surface/impl/organized_fast_mesh.hpp>
#include <pcl/impl/instantiate.hpp>
#include <pcl/point_types.h>
#include <pcl/features/impl/normal_3d_omp.hpp>
Include dependency graph for util3d_surface.cpp:

Go to the source code of this file.

Namespaces

namespace  rtabmap
namespace  rtabmap::util3d

Functions

LaserScan RTABMAP_EXP rtabmap::util3d::adjustNormalsToViewPoint (const LaserScan &scan, const Eigen::Vector3f &viewpoint, bool forceGroundNormalsUp)
void RTABMAP_EXP rtabmap::util3d::adjustNormalsToViewPoint (pcl::PointCloud< pcl::PointNormal >::Ptr &cloud, const Eigen::Vector3f &viewpoint=Eigen::Vector3f(0, 0, 0), bool forceGroundNormalsUp=false)
void RTABMAP_EXP rtabmap::util3d::adjustNormalsToViewPoint (pcl::PointCloud< pcl::PointXYZRGBNormal >::Ptr &cloud, const Eigen::Vector3f &viewpoint=Eigen::Vector3f(0, 0, 0), bool forceGroundNormalsUp=false)
void RTABMAP_EXP rtabmap::util3d::adjustNormalsToViewPoints (const std::map< int, Transform > &poses, const pcl::PointCloud< pcl::PointXYZ >::Ptr &rawCloud, const std::vector< int > &rawCameraIndices, pcl::PointCloud< pcl::PointNormal >::Ptr &cloud)
void RTABMAP_EXP rtabmap::util3d::adjustNormalsToViewPoints (const std::map< int, Transform > &poses, const pcl::PointCloud< pcl::PointXYZ >::Ptr &rawCloud, const std::vector< int > &rawCameraIndices, pcl::PointCloud< pcl::PointXYZRGBNormal >::Ptr &cloud)
void RTABMAP_EXP rtabmap::util3d::appendMesh (pcl::PointCloud< pcl::PointXYZRGBNormal > &cloudA, std::vector< pcl::Vertices > &polygonsA, const pcl::PointCloud< pcl::PointXYZRGBNormal > &cloudB, const std::vector< pcl::Vertices > &polygonsB)
void RTABMAP_EXP rtabmap::util3d::appendMesh (pcl::PointCloud< pcl::PointXYZRGB > &cloudA, std::vector< pcl::Vertices > &polygonsA, const pcl::PointCloud< pcl::PointXYZRGB > &cloudB, const std::vector< pcl::Vertices > &polygonsB)
pcl::PolygonMesh::Ptr RTABMAP_EXP rtabmap::util3d::assemblePolygonMesh (const cv::Mat &cloudMat, const std::vector< std::vector< unsigned int > > &polygons)
pcl::TextureMesh::Ptr RTABMAP_EXP rtabmap::util3d::assembleTextureMesh (const cv::Mat &cloudMat, const std::vector< std::vector< std::vector< unsigned int > > > &polygons, const std::vector< std::vector< Eigen::Vector2f > > &texCoords, cv::Mat &textures, bool mergeTextures=false)
void RTABMAP_EXP rtabmap::util3d::cleanTextureMesh (pcl::TextureMesh &textureMesh, int minClusterSize)
std::list< std::list< int >
> RTABMAP_EXP 
rtabmap::util3d::clusterPolygons (const std::vector< std::set< int > > &neighborPolygons, int minClusterSize=0)
pcl::PointCloud< pcl::Normal >
::Ptr RTABMAP_EXP 
rtabmap::util3d::computeFastOrganizedNormals (const pcl::PointCloud< pcl::PointXYZRGB >::Ptr &cloud, float maxDepthChangeFactor=0.02f, float normalSmoothingSize=10.0f, const Eigen::Vector3f &viewPoint=Eigen::Vector3f(0, 0, 0))
pcl::PointCloud< pcl::Normal >
::Ptr RTABMAP_EXP 
rtabmap::util3d::computeFastOrganizedNormals (const pcl::PointCloud< pcl::PointXYZRGB >::Ptr &cloud, const pcl::IndicesPtr &indices, float maxDepthChangeFactor=0.02f, float normalSmoothingSize=10.0f, const Eigen::Vector3f &viewPoint=Eigen::Vector3f(0, 0, 0))
pcl::PointCloud< pcl::Normal >
::Ptr RTABMAP_EXP 
rtabmap::util3d::computeFastOrganizedNormals2D (const pcl::PointCloud< pcl::PointXYZ >::Ptr &cloud, int searchK=5, float searchRadius=0.0f, const Eigen::Vector3f &viewPoint=Eigen::Vector3f(0, 0, 0))
pcl::PointCloud< pcl::Normal >
::Ptr RTABMAP_EXP 
rtabmap::util3d::computeFastOrganizedNormals2D (const pcl::PointCloud< pcl::PointXYZI >::Ptr &cloud, int searchK=5, float searchRadius=0.0f, const Eigen::Vector3f &viewPoint=Eigen::Vector3f(0, 0, 0))
template<typename PointT >
pcl::PointCloud< pcl::Normal >::Ptr rtabmap::util3d::computeFastOrganizedNormals2DImpl (const typename pcl::PointCloud< PointT >::Ptr &cloud, int searchK, float searchRadius, const Eigen::Vector3f &viewPoint)
pcl::PointCloud< pcl::Normal >
::Ptr RTABMAP_EXP 
rtabmap::util3d::computeNormals (const pcl::PointCloud< pcl::PointXYZ >::Ptr &cloud, int searchK=20, float searchRadius=0.0f, const Eigen::Vector3f &viewPoint=Eigen::Vector3f(0, 0, 0))
pcl::PointCloud< pcl::Normal >
::Ptr RTABMAP_EXP 
rtabmap::util3d::computeNormals (const pcl::PointCloud< pcl::PointXYZRGB >::Ptr &cloud, int searchK=20, float searchRadius=0.0f, const Eigen::Vector3f &viewPoint=Eigen::Vector3f(0, 0, 0))
pcl::PointCloud< pcl::Normal >
::Ptr RTABMAP_EXP 
rtabmap::util3d::computeNormals (const pcl::PointCloud< pcl::PointXYZI >::Ptr &cloud, int searchK=20, float searchRadius=0.0f, const Eigen::Vector3f &viewPoint=Eigen::Vector3f(0, 0, 0))
pcl::PointCloud< pcl::Normal >
::Ptr RTABMAP_EXP 
rtabmap::util3d::computeNormals (const pcl::PointCloud< pcl::PointXYZ >::Ptr &cloud, const pcl::IndicesPtr &indices, int searchK=20, float searchRadius=0.0f, const Eigen::Vector3f &viewPoint=Eigen::Vector3f(0, 0, 0))
pcl::PointCloud< pcl::Normal >
::Ptr RTABMAP_EXP 
rtabmap::util3d::computeNormals (const pcl::PointCloud< pcl::PointXYZRGB >::Ptr &cloud, const pcl::IndicesPtr &indices, int searchK=20, float searchRadius=0.0f, const Eigen::Vector3f &viewPoint=Eigen::Vector3f(0, 0, 0))
pcl::PointCloud< pcl::Normal >
::Ptr RTABMAP_EXP 
rtabmap::util3d::computeNormals (const pcl::PointCloud< pcl::PointXYZI >::Ptr &cloud, const pcl::IndicesPtr &indices, int searchK=20, float searchRadius=0.0f, const Eigen::Vector3f &viewPoint=Eigen::Vector3f(0, 0, 0))
LaserScan rtabmap::util3d::computeNormals (const LaserScan &laserScan, int searchK, float searchRadius)
pcl::PointCloud< pcl::Normal >
::Ptr RTABMAP_EXP 
rtabmap::util3d::computeNormals2D (const pcl::PointCloud< pcl::PointXYZ >::Ptr &cloud, int searchK=5, float searchRadius=0.0f, const Eigen::Vector3f &viewPoint=Eigen::Vector3f(0, 0, 0))
pcl::PointCloud< pcl::Normal >
::Ptr RTABMAP_EXP 
rtabmap::util3d::computeNormals2D (const pcl::PointCloud< pcl::PointXYZI >::Ptr &cloud, int searchK=5, float searchRadius=0.0f, const Eigen::Vector3f &viewPoint=Eigen::Vector3f(0, 0, 0))
template<typename PointT >
pcl::PointCloud< pcl::Normal >::Ptr rtabmap::util3d::computeNormals2DImpl (const typename pcl::PointCloud< PointT >::Ptr &cloud, int searchK, float searchRadius, const Eigen::Vector3f &viewPoint)
float RTABMAP_EXP rtabmap::util3d::computeNormalsComplexity (const LaserScan &scan, cv::Mat *pcaEigenVectors=0, cv::Mat *pcaEigenValues=0)
float RTABMAP_EXP rtabmap::util3d::computeNormalsComplexity (const pcl::PointCloud< pcl::Normal > &normals, bool is2d=false, cv::Mat *pcaEigenVectors=0, cv::Mat *pcaEigenValues=0)
float RTABMAP_EXP rtabmap::util3d::computeNormalsComplexity (const pcl::PointCloud< pcl::PointNormal > &cloud, bool is2d=false, cv::Mat *pcaEigenVectors=0, cv::Mat *pcaEigenValues=0)
float RTABMAP_EXP rtabmap::util3d::computeNormalsComplexity (const pcl::PointCloud< pcl::PointXYZRGBNormal > &cloud, bool is2d=false, cv::Mat *pcaEigenVectors=0, cv::Mat *pcaEigenValues=0)
template<typename PointT >
pcl::PointCloud< pcl::Normal >::Ptr rtabmap::util3d::computeNormalsImpl (const typename pcl::PointCloud< PointT >::Ptr &cloud, const pcl::IndicesPtr &indices, int searchK, float searchRadius, const Eigen::Vector3f &viewPoint)
void RTABMAP_EXP rtabmap::util3d::concatenateTextureMaterials (pcl::TextureMesh &mesh, const cv::Size &imageSize, int textureSize, int maxTextures, float &scale, std::vector< bool > *materialsKept=0)
pcl::TextureMesh::Ptr RTABMAP_EXP rtabmap::util3d::concatenateTextureMeshes (const std::list< pcl::TextureMesh::Ptr > &meshes)
std::vector< std::vector
< unsigned int > > RTABMAP_EXP 
rtabmap::util3d::convertPolygonsFromPCL (const std::vector< pcl::Vertices > &polygons)
std::vector< std::vector
< std::vector< unsigned int >
> > RTABMAP_EXP 
rtabmap::util3d::convertPolygonsFromPCL (const std::vector< std::vector< pcl::Vertices > > &polygons)
std::vector< pcl::Vertices >
RTABMAP_EXP 
rtabmap::util3d::convertPolygonsToPCL (const std::vector< std::vector< unsigned int > > &polygons)
std::vector< std::vector
< pcl::Vertices >
> RTABMAP_EXP 
rtabmap::util3d::convertPolygonsToPCL (const std::vector< std::vector< std::vector< unsigned int > > > &tex_polygons)
pcl::PolygonMesh::Ptr RTABMAP_EXP rtabmap::util3d::createMesh (const pcl::PointCloud< pcl::PointXYZRGBNormal >::Ptr &cloudWithNormals, float gp3SearchRadius=0.025, float gp3Mu=2.5, int gp3MaximumNearestNeighbors=100, float gp3MaximumSurfaceAngle=M_PI/4, float gp3MinimumAngle=M_PI/18, float gp3MaximumAngle=2 *M_PI/3, bool gp3NormalConsistency=true)
void RTABMAP_EXP rtabmap::util3d::createPolygonIndexes (const std::vector< pcl::Vertices > &polygons, int cloudSize, std::vector< std::set< int > > &neighborPolygons, std::vector< std::set< int > > &vertexPolygons)
 Given a set of polygons, create two indexes: polygons to neighbor polygons and vertices to polygons.
pcl::texture_mapping::CameraVector rtabmap::util3d::createTextureCameras (const std::map< int, Transform > &poses, const std::map< int, std::vector< CameraModel > > &cameraModels, const std::map< int, cv::Mat > &cameraDepths, const std::vector< float > &roiRatios)
pcl::TextureMesh::Ptr RTABMAP_EXP rtabmap::util3d::createTextureMesh (const pcl::PolygonMesh::Ptr &mesh, const std::map< int, Transform > &poses, const std::map< int, CameraModel > &cameraModels, const std::map< int, cv::Mat > &cameraDepths, float maxDistance=0.0f, float maxDepthError=0.0f, float maxAngle=0.0f, int minClusterSize=50, const std::vector< float > &roiRatios=std::vector< float >(), const ProgressState *state=0, std::vector< std::map< int, pcl::PointXY > > *vertexToPixels=0)
pcl::TextureMesh::Ptr RTABMAP_EXP rtabmap::util3d::createTextureMesh (const pcl::PolygonMesh::Ptr &mesh, const std::map< int, Transform > &poses, const std::map< int, std::vector< CameraModel > > &cameraModels, const std::map< int, cv::Mat > &cameraDepths, float maxDistance=0.0f, float maxDepthError=0.0f, float maxAngle=0.0f, int minClusterSize=50, const std::vector< float > &roiRatios=std::vector< float >(), const ProgressState *state=0, std::vector< std::map< int, pcl::PointXY > > *vertexToPixels=0)
std::vector< pcl::Vertices >
RTABMAP_EXP 
rtabmap::util3d::filterCloseVerticesFromMesh (const pcl::PointCloud< pcl::PointXYZRGBNormal >::Ptr cloud, const std::vector< pcl::Vertices > &polygons, float radius, float angle, bool keepLatestInRadius)
std::vector< pcl::Vertices >
RTABMAP_EXP 
rtabmap::util3d::filterInvalidPolygons (const std::vector< pcl::Vertices > &polygons)
std::vector< int > RTABMAP_EXP rtabmap::util3d::filterNaNPointsFromMesh (const pcl::PointCloud< pcl::PointXYZRGB > &cloud, const std::vector< pcl::Vertices > &polygons, pcl::PointCloud< pcl::PointXYZRGB > &outputCloud, std::vector< pcl::Vertices > &outputPolygons)
std::vector< int > RTABMAP_EXP rtabmap::util3d::filterNotUsedVerticesFromMesh (const pcl::PointCloud< pcl::PointXYZRGBNormal > &cloud, const std::vector< pcl::Vertices > &polygons, pcl::PointCloud< pcl::PointXYZRGBNormal > &outputCloud, std::vector< pcl::Vertices > &outputPolygons)
std::vector< int > RTABMAP_EXP rtabmap::util3d::filterNotUsedVerticesFromMesh (const pcl::PointCloud< pcl::PointXYZRGB > &cloud, const std::vector< pcl::Vertices > &polygons, pcl::PointCloud< pcl::PointXYZRGB > &outputCloud, std::vector< pcl::Vertices > &outputPolygons)
void RTABMAP_EXP rtabmap::util3d::fixTextureMeshForVisualization (pcl::TextureMesh &textureMesh)
int rtabmap::util3d::gcd (int a, int b)
cv::Mat RTABMAP_EXP rtabmap::util3d::mergeTextures (pcl::TextureMesh &mesh, const std::map< int, cv::Mat > &images, const std::map< int, CameraModel > &calibrations, const Memory *memory=0, const DBDriver *dbDriver=0, int textureSize=4096, int textureCount=1, const std::vector< std::map< int, pcl::PointXY > > &vertexToPixels=std::vector< std::map< int, pcl::PointXY > >(), bool gainCompensation=true, float gainBeta=10.0f, bool gainRGB=true, bool blending=true, int blendingDecimation=0, int brightnessContrastRatioLow=0, int brightnessContrastRatioHigh=0, bool exposureFusion=false, const ProgressState *state=0)
cv::Mat RTABMAP_EXP rtabmap::util3d::mergeTextures (pcl::TextureMesh &mesh, const std::map< int, cv::Mat > &images, const std::map< int, std::vector< CameraModel > > &calibrations, const Memory *memory=0, const DBDriver *dbDriver=0, int textureSize=4096, int textureCount=1, const std::vector< std::map< int, pcl::PointXY > > &vertexToPixels=std::vector< std::map< int, pcl::PointXY > >(), bool gainCompensation=true, float gainBeta=10.0f, bool gainRGB=true, bool blending=true, int blendingDecimation=0, int brightnessContrastRatioLow=0, int brightnessContrastRatioHigh=0, bool exposureFusion=false, const ProgressState *state=0)
pcl::PolygonMesh::Ptr RTABMAP_EXP rtabmap::util3d::meshDecimation (const pcl::PolygonMesh::Ptr &mesh, float factor)
pcl::PointCloud
< pcl::PointXYZRGBNormal >
::Ptr RTABMAP_EXP 
rtabmap::util3d::mls (const pcl::PointCloud< pcl::PointXYZRGB >::Ptr &cloud, float searchRadius=0.0f, int polygonialOrder=2, int upsamplingMethod=0, float upsamplingRadius=0.0f, float upsamplingStep=0.0f, int pointDensity=0, float dilationVoxelSize=1.0f, int dilationIterations=0)
pcl::PointCloud
< pcl::PointXYZRGBNormal >
::Ptr RTABMAP_EXP 
rtabmap::util3d::mls (const pcl::PointCloud< pcl::PointXYZRGB >::Ptr &cloud, const pcl::IndicesPtr &indices, float searchRadius=0.0f, int polygonialOrder=2, int upsamplingMethod=0, float upsamplingRadius=0.0f, float upsamplingStep=0.0f, int pointDensity=0, float dilationVoxelSize=1.0f, int dilationIterations=0)
std::vector< pcl::Vertices >
RTABMAP_EXP 
rtabmap::util3d::organizedFastMesh (const pcl::PointCloud< pcl::PointXYZ >::Ptr &cloud, double angleTolerance, bool quad, int trianglePixelSize, const Eigen::Vector3f &viewpoint=Eigen::Vector3f(0, 0, 0))
std::vector< pcl::Vertices >
RTABMAP_EXP 
rtabmap::util3d::organizedFastMesh (const pcl::PointCloud< pcl::PointXYZRGB >::Ptr &cloud, double angleTolerance=M_PI/16, bool quad=true, int trianglePixelSize=2, const Eigen::Vector3f &viewpoint=Eigen::Vector3f(0, 0, 0))
std::vector< pcl::Vertices >
RTABMAP_EXP 
rtabmap::util3d::organizedFastMesh (const pcl::PointCloud< pcl::PointXYZRGBNormal >::Ptr &cloud, double angleTolerance=M_PI/16, bool quad=true, int trianglePixelSize=2, const Eigen::Vector3f &viewpoint=Eigen::Vector3f(0, 0, 0))
double rtabmap::util3d::sqr (uchar v)


rtabmap
Author(s): Mathieu Labbe
autogenerated on Thu Jun 6 2019 21:59:37