![]() |
OpenCV 5.0.0
Open Source Computer Vision
|
Classes | |
| class | cv::RegionGrowing3D |
| Region Growing algorithm in 3D point cloud. More... | |
| class | cv::SACSegmentation |
| Sample Consensus algorithm segmentation of 3D point cloud model. More... | |
Enumerations | |
| enum | cv::SacMethod { cv::SAC_METHOD_RANSAC } |
| type of the robust estimation algorithm More... | |
| enum | cv::SacModelType { cv::SAC_MODEL_PLANE , cv::SAC_MODEL_SPHERE } |
Functions | |
| int | cv::farthestPointSampling (OutputArray sampled_point_flags, InputArray input_pts, float sampled_scale, float dist_lower_limit=0, RNG *rng=nullptr) |
| int | cv::farthestPointSampling (OutputArray sampled_point_flags, InputArray input_pts, int sampled_pts_size, float dist_lower_limit=0, RNG *rng=nullptr) |
| Point cloud sampling by Farthest Point Sampling(FPS). | |
| void | cv::normalEstimate (OutputArray normals, OutputArray curvatures, InputArray input_pts, InputArrayOfArrays nn_idx, int max_neighbor_num=0) |
| Estimate the normal and curvature of each point in point cloud from NN results. | |
| void | cv::randomSampling (OutputArray sampled_pts, InputArray input_pts, float sampled_scale, RNG *rng=nullptr) |
| void | cv::randomSampling (OutputArray sampled_pts, InputArray input_pts, int sampled_pts_size, RNG *rng=nullptr) |
| Point cloud sampling by randomly select points. | |
| int | cv::voxelGridSampling (OutputArray sampled_point_flags, InputArray input_pts, float length, float width, float height) |
| Point cloud sampling by Voxel Grid filter downsampling. | |
| enum cv::SacMethod |
#include <opencv2/geometry/segment.hpp>
type of the robust estimation algorithm
| Enumerator | |
|---|---|
| SAC_METHOD_RANSAC Python: cv.SAC_METHOD_RANSAC | The RANSAC algorithm described in [fischler1981random]. |
| enum cv::SacModelType |
#include <opencv2/geometry/segment.hpp>
| int cv::farthestPointSampling | ( | OutputArray | sampled_point_flags, |
| InputArray | input_pts, | ||
| float | sampled_scale, | ||
| float | dist_lower_limit = 0, | ||
| RNG * | rng = nullptr ) |
#include <opencv2/geometry/segment.hpp>
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| [out] | sampled_point_flags | Flags of the sampled point, (pass in std::vector<int> or std::vector<char> etc.) sampled_point_flags[i] is 1 means i-th point selected, 0 means it is not selected. |
| input_pts | Original point cloud, vector of Point3 or Mat of size Nx3/3xN. | |
| sampled_scale | Range (0, 1), the percentage of the sampled point cloud to the original size, that is, sampled size = original size * sampled_scale. | |
| dist_lower_limit | Sampling is terminated early if the distance from the farthest point to S is less than dist_lower_limit, default 0. | |
| rng | Optional random number generator used for selecting seed point for FPS; if it is nullptr, theRNG () is used instead. |
| int cv::farthestPointSampling | ( | OutputArray | sampled_point_flags, |
| InputArray | input_pts, | ||
| int | sampled_pts_size, | ||
| float | dist_lower_limit = 0, | ||
| RNG * | rng = nullptr ) |
#include <opencv2/geometry/segment.hpp>
Point cloud sampling by Farthest Point Sampling(FPS).
FPS Algorithm:
| [out] | sampled_point_flags | Flags of the sampled point, (pass in std::vector<int> or std::vector<char> etc.) sampled_point_flags[i] is 1 means i-th point selected, 0 means it is not selected. |
| input_pts | Original point cloud, vector of Point3 or Mat of size Nx3/3xN. | |
| sampled_pts_size | The desired point cloud size after sampling. | |
| dist_lower_limit | Sampling is terminated early if the distance from the farthest point to S is less than dist_lower_limit, default 0. | |
| rng | Optional random number generator used for selecting seed point for FPS; if it is nullptr, theRNG () is used instead. |
| void cv::normalEstimate | ( | OutputArray | normals, |
| OutputArray | curvatures, | ||
| InputArray | input_pts, | ||
| InputArrayOfArrays | nn_idx, | ||
| int | max_neighbor_num = 0 ) |
#include <opencv2/geometry/segment.hpp>
Estimate the normal and curvature of each point in point cloud from NN results.
Normal estimation by PCA:
| [out] | normals | Normal of each point, support vector<Point3f> and Mat of size Nx3. |
| [out] | curvatures | Curvature of each point, support vector<float> and Mat. |
| input_pts | Original point cloud, support vector<Point3f> and Mat of size Nx3/3xN. | |
| nn_idx | Index information of nearest neighbors of all points. The first nearest neighbor of each point is itself. Support vector<vector<int>>, vector<Mat> and Mat of size NxK. If the information in a row is [0, 2, 1, -5, -1, 4, 7 ... negative number], it will use only non-negative indexes until it meets a negative number or bound of this row i.e. [0, 2, 1]. | |
| max_neighbor_num | The maximum number of neighbors want to use including itself. Setting to a non-positive number or default will use the information from nn_idx. |
| void cv::randomSampling | ( | OutputArray | sampled_pts, |
| InputArray | input_pts, | ||
| float | sampled_scale, | ||
| RNG * | rng = nullptr ) |
#include <opencv2/geometry/segment.hpp>
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| sampled_pts | Point cloud after sampling. Support cv::Mat(size * sampled_scale, 3, CV_32F), std::vector<cv::Point3f>. |
| input_pts | Original point cloud, vector of Point3 or Mat of size Nx3/3xN. |
| sampled_scale | Range (0, 1), the percentage of the sampled point cloud to the original size, that is, sampled size = original size * sampled_scale. |
| rng | Optional random number generator used for cv::randShuffle; if it is nullptr, theRNG () is used instead. |
| void cv::randomSampling | ( | OutputArray | sampled_pts, |
| InputArray | input_pts, | ||
| int | sampled_pts_size, | ||
| RNG * | rng = nullptr ) |
#include <opencv2/geometry/segment.hpp>
Point cloud sampling by randomly select points.
Use cv::randShuffle to shuffle the point index list, then take the points corresponding to the front part of the list.
| sampled_pts | Point cloud after sampling. Support cv::Mat(sampled_pts_size, 3, CV_32F), std::vector<cv::Point3f>. |
| input_pts | Original point cloud, vector of Point3 or Mat of size Nx3/3xN. |
| sampled_pts_size | The desired point cloud size after sampling. |
| rng | Optional random number generator used for cv::randShuffle; if it is nullptr, theRNG () is used instead. |
| int cv::voxelGridSampling | ( | OutputArray | sampled_point_flags, |
| InputArray | input_pts, | ||
| float | length, | ||
| float | width, | ||
| float | height ) |
#include <opencv2/geometry/segment.hpp>
Point cloud sampling by Voxel Grid filter downsampling.
Creates a 3D voxel grid (a set of tiny 3D boxes in space) over the input point cloud data, in each voxel (i.e., 3D box), all the points present will be approximated (i.e., downsampled) with the point closest to their centroid.
| [out] | sampled_point_flags | Flags of the sampled point, (pass in std::vector<int> or std::vector<char> etc.) sampled_point_flags[i] is 1 means i-th point selected, 0 means it is not selected. |
| input_pts | Original point cloud, vector of Point3 or Mat of size Nx3/3xN. | |
| length | Grid length. | |
| width | Grid width. | |
| height | Grid height. |