![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
Classes | |
| class | PointXYZ |
| struct | PointCloud |
| class | SampledData |
| struct | Point |
Functions | |
| PointXYZ | max_point (std::vector< PointXYZ > points) |
| PointXYZ | min_point (std::vector< PointXYZ > points) |
| PointXYZ | operator+ (const PointXYZ A, const PointXYZ B) |
| PointXYZ | operator- (const PointXYZ A, const PointXYZ B) |
| PointXYZ | operator* (const PointXYZ P, const float a) |
| PointXYZ | operator* (const float a, const PointXYZ P) |
| std::ostream & | operator<< (std::ostream &os, const PointXYZ P) |
| bool | operator== (const PointXYZ A, const PointXYZ B) |
| const core::Tensor | KnnSearch (const core::Tensor &query_points, const core::Tensor &dataset_points, int knn) |
| const core::Tensor | RadiusSearch (const core::Tensor &query_points, const core::Tensor &dataset_points, const core::Tensor &query_batches, const core::Tensor &dataset_batches, double radius) |
| int | OptNumThreads (int work_size) |
| dim3 | OptBlockConfig (int x, int y) |
| void | grid_subsampling (std::vector< PointXYZ > &original_points, std::vector< PointXYZ > &subsampled_points, std::vector< float > &original_features, std::vector< float > &subsampled_features, std::vector< int > &original_classes, std::vector< int > &subsampled_classes, float sampleDl, int verbose) |
| void | batch_grid_subsampling (std::vector< PointXYZ > &original_points, std::vector< PointXYZ > &subsampled_points, std::vector< float > &original_features, std::vector< float > &subsampled_features, std::vector< int > &original_classes, std::vector< int > &subsampled_classes, std::vector< int > &original_batches, std::vector< int > &subsampled_batches, float sampleDl, int max_p) |
| void | IoUBevCPUKernel (const float *boxes_a, const float *boxes_b, float *iou, int num_a, int num_b) |
| void | IoU3dCPUKernel (const float *boxes_a, const float *boxes_b, float *iou, int num_a, int num_b) |
| CLOUDVIEWER_HOST_DEVICE float | Cross (const Point &a, const Point &b) |
| CLOUDVIEWER_HOST_DEVICE float | Cross (const Point &p1, const Point &p2, const Point &p0) |
| CLOUDVIEWER_HOST_DEVICE int | CheckRectCross (const Point &p1, const Point &p2, const Point &q1, const Point &q2) |
| CLOUDVIEWER_HOST_DEVICE int | CheckInBox2D (const float *box, const Point &p) |
| CLOUDVIEWER_HOST_DEVICE int | Intersection (const Point &p1, const Point &p0, const Point &q1, const Point &q0, Point &ans) |
| CLOUDVIEWER_HOST_DEVICE void | RotateAroundCenter (const Point ¢er, const float angle_cos, const float angle_sin, Point &p) |
| CLOUDVIEWER_HOST_DEVICE int | PointCmp (const Point &a, const Point &b, const Point ¢er) |
| CLOUDVIEWER_HOST_DEVICE float | BoxOverlap (const float *box_a, const float *box_b) |
| CLOUDVIEWER_HOST_DEVICE float | IoUBev2DWithMinAndMax (const float *box_a, const float *box_b, bool intersection_only=false) |
| (x_min, z_min, x_max, z_max, y_rotate) More... | |
| CLOUDVIEWER_HOST_DEVICE float | IoUBev2DWithCenterAndSize (const float *box_a, const float *box_b, bool intersection_only=false) |
| (x_center, z_center, x_size, z_size, y_rotate) More... | |
| CLOUDVIEWER_HOST_DEVICE float | IoU3DWithCenterAndSize (const float *box_a, const float *box_b) |
| (x_center, y_max, z_center, x_size, y_size, z_size, y_rotate) More... | |
| void | brute_neighbors (std::vector< PointXYZ > &queries, std::vector< PointXYZ > &supports, std::vector< int > &neighbors_indices, float radius, int verbose) |
| void | ordered_neighbors (std::vector< PointXYZ > &queries, std::vector< PointXYZ > &supports, std::vector< int > &neighbors_indices, float radius) |
| void | batch_nanoflann_neighbors (std::vector< PointXYZ > &queries, std::vector< PointXYZ > &supports, std::vector< int > &q_batches, std::vector< int > &s_batches, std::vector< int > &neighbors_indices, float radius) |
| template<typename T > | |
| static std::vector< int64_t > | SortIndexes (const T *values, int64_t num, bool descending=false) |
| static void | AllPairsSortedIoU (const float *boxes, const float *scores, const int64_t *sort_indices, uint64_t *mask, int n, double nms_overlap_thresh) |
| std::vector< int64_t > | NmsCPUKernel (const float *boxes, const float *scores, int n, double nms_overlap_thresh) |
| void | pybind_contrib (py::module &m) |
| void | pybind_contrib_subsample (py::module &m_contrib) |
| void | pybind_contrib_nns (py::module &m_contrib) |
| void | pybind_contrib_iou (py::module &m_contrib) |
| const py::tuple | SubsampleBatch (py::array points, py::array batches, utility::optional< py::array > features, utility::optional< py::array > classes, float sampleDl, const std::string &method, int max_p, int verbose) |
| const py::object | Subsample (py::array points, utility::optional< py::array > features, utility::optional< py::array > classes, float sampleDl, int verbose) |
| py::array | IouBevCPU (py::array boxes_a, py::array boxes_b) |
| py::array | Iou3dCPU (py::array boxes_a, py::array boxes_b) |
Variables | |
| constexpr int | NMS_BLOCK_SIZE = sizeof(uint64_t) * 8 |
| constexpr float | EPS = static_cast<float>(1e-8) |
|
static |
Definition at line 44 of file Nms.cpp.
References cloudViewer::utility::DivUp(), and NMS_BLOCK_SIZE.
Referenced by NmsCPUKernel().
| void cloudViewer::ml::contrib::batch_grid_subsampling | ( | std::vector< PointXYZ > & | original_points, |
| std::vector< PointXYZ > & | subsampled_points, | ||
| std::vector< float > & | original_features, | ||
| std::vector< float > & | subsampled_features, | ||
| std::vector< int > & | original_classes, | ||
| std::vector< int > & | subsampled_classes, | ||
| std::vector< int > & | original_batches, | ||
| std::vector< int > & | subsampled_batches, | ||
| float | sampleDl, | ||
| int | max_p | ||
| ) |
Definition at line 122 of file GridSubsampling.cpp.
References grid_subsampling().
Referenced by SubsampleBatch().
| void cloudViewer::ml::contrib::batch_nanoflann_neighbors | ( | std::vector< PointXYZ > & | queries, |
| std::vector< PointXYZ > & | supports, | ||
| std::vector< int > & | q_batches, | ||
| std::vector< int > & | s_batches, | ||
| std::vector< int > & | neighbors_indices, | ||
| float | radius | ||
| ) |
TOOD: This is a temporary function for 3DML repositiory use. In the future, the native CloudViewer Python API should be improved and used.
Nearest neighbours withing a radius with batching. queries and supports are sliced with their respective batch elements. Uses nanoflann to build a KDTree and find neighbors.
Definition at line 125 of file neighbors.cpp.
|
inline |
Definition at line 132 of file IoUImpl.h.
References CheckInBox2D(), CLOUDVIEWER_ASSERT, Cross(), fabs(), Intersection(), PointCmp(), RotateAroundCenter(), cloudViewer::ml::contrib::Point::set(), cloudViewer::ml::contrib::Point::x_, and cloudViewer::ml::contrib::Point::y_.
Referenced by IoUBev2DWithMinAndMax().
| void cloudViewer::ml::contrib::brute_neighbors | ( | std::vector< PointXYZ > & | queries, |
| std::vector< PointXYZ > & | supports, | ||
| std::vector< int > & | neighbors_indices, | ||
| float | radius, | ||
| int | verbose | ||
| ) |
Definition at line 14 of file neighbors.cpp.
References size.
|
inline |
Definition at line 61 of file IoUImpl.h.
References cloudViewer::ml::contrib::Point::x_, and cloudViewer::ml::contrib::Point::y_.
Referenced by BoxOverlap().
|
inline |
Definition at line 50 of file IoUImpl.h.
References cloudViewer::ml::contrib::Point::x_, and cloudViewer::ml::contrib::Point::y_.
Referenced by Intersection().
|
inline |
Definition at line 39 of file IoUImpl.h.
References cloudViewer::ml::contrib::Point::x_, and cloudViewer::ml::contrib::Point::y_.
Referenced by BoxOverlap(), and Intersection().
|
inline |
Definition at line 43 of file IoUImpl.h.
References cloudViewer::ml::contrib::Point::x_, and cloudViewer::ml::contrib::Point::y_.
| void cloudViewer::ml::contrib::grid_subsampling | ( | std::vector< PointXYZ > & | original_points, |
| std::vector< PointXYZ > & | subsampled_points, | ||
| std::vector< float > & | original_features, | ||
| std::vector< float > & | subsampled_features, | ||
| std::vector< int > & | original_classes, | ||
| std::vector< int > & | subsampled_classes, | ||
| float | sampleDl, | ||
| int | verbose | ||
| ) |
Definition at line 14 of file GridSubsampling.cpp.
References count, cloudViewer::utility::floor(), cloudViewer::ml::contrib::PointXYZ::floor(), max_point(), min_point(), cloudViewer::ml::contrib::PointXYZ::x, cloudViewer::ml::contrib::PointXYZ::y, and cloudViewer::ml::contrib::PointXYZ::z.
Referenced by batch_grid_subsampling(), and Subsample().
|
inline |
Definition at line 78 of file IoUImpl.h.
References CheckRectCross(), Cross(), EPS, fabs(), cloudViewer::ml::contrib::Point::x_, and cloudViewer::ml::contrib::Point::y_.
Referenced by BoxOverlap().
| py::array cloudViewer::ml::contrib::Iou3dCPU | ( | py::array | boxes_a, |
| py::array | boxes_b | ||
| ) |
Definition at line 47 of file iou.cpp.
References AssertTensorDtype, AssertTensorShape, cloudViewer::core::Tensor::Contiguous(), cloudViewer::core::Float32, cloudViewer::core::Tensor::GetDataPtr(), cloudViewer::core::Tensor::GetLength(), IoU3dCPUKernel(), cloudViewer::utility::nullopt, cloudViewer::core::PyArrayToTensor(), and cloudViewer::core::TensorToPyArray().
Referenced by pybind_contrib_iou().
| void cloudViewer::ml::contrib::IoU3dCPUKernel | ( | const float * | boxes_a, |
| const float * | boxes_b, | ||
| float * | iou, | ||
| int | num_a, | ||
| int | num_b | ||
| ) |
| boxes_a | (num_a, 7) float32. |
| boxes_b | (num_b, 7) float32. |
| iou | (num_a, num_b) float32, output iou values. |
| num_a | Number of boxes in boxes_a. |
| num_b | Number of boxes in boxes_b. |
Definition at line 33 of file IoU.cpp.
Referenced by Iou3dCPU().
|
inline |
(x_center, y_max, z_center, x_size, y_size, z_size, y_rotate)
Definition at line 268 of file IoUImpl.h.
References IoUBev2DWithCenterAndSize().
|
inline |
(x_center, z_center, x_size, z_size, y_rotate)
Definition at line 247 of file IoUImpl.h.
References IoUBev2DWithMinAndMax().
Referenced by IoU3DWithCenterAndSize().
|
inline |
(x_min, z_min, x_max, z_max, y_rotate)
Definition at line 230 of file IoUImpl.h.
References BoxOverlap(), EPS, and fmaxf().
Referenced by IoUBev2DWithCenterAndSize().
| py::array cloudViewer::ml::contrib::IouBevCPU | ( | py::array | boxes_a, |
| py::array | boxes_b | ||
| ) |
Definition at line 23 of file iou.cpp.
References AssertTensorDtype, AssertTensorShape, cloudViewer::core::Tensor::Contiguous(), cloudViewer::core::Float32, cloudViewer::core::Tensor::GetDataPtr(), cloudViewer::core::Tensor::GetLength(), IoUBevCPUKernel(), cloudViewer::utility::nullopt, cloudViewer::core::PyArrayToTensor(), and cloudViewer::core::TensorToPyArray().
Referenced by pybind_contrib_iou().
| void cloudViewer::ml::contrib::IoUBevCPUKernel | ( | const float * | boxes_a, |
| const float * | boxes_b, | ||
| float * | iou, | ||
| int | num_a, | ||
| int | num_b | ||
| ) |
| boxes_a | (num_a, 5) float32. |
| boxes_b | (num_b, 5) float32. |
| iou | (num_a, num_b) float32, output iou values. |
| num_a | Number of boxes in boxes_a. |
| num_b | Number of boxes in boxes_b. intersection over union. |
Definition at line 18 of file IoU.cpp.
Referenced by IouBevCPU().
| const core::Tensor cloudViewer::ml::contrib::KnnSearch | ( | const core::Tensor & | query_points, |
| const core::Tensor & | dataset_points, | ||
| int | knn | ||
| ) |
TOOD: This is a temory wrapper for 3DML repositiory use. In the future, the native CloudViewer Python API should be improved and used.
| query_points | Tensor of shape {n_query_points, d}, dtype Float32. |
| dataset_points | Tensor of shape {n_dataset_points, d}, dtype Float32. |
| knn | Int. |
Definition at line 18 of file contrib_nns.cpp.
References cloudViewer::core::Tensor::GetDtype(), cloudViewer::core::Tensor::GetShape(), cloudViewer::core::Int32, cloudViewer::core::nns::NearestNeighborSearch::KnnIndex(), cloudViewer::core::nns::NearestNeighborSearch::KnnSearch(), LogError, cloudViewer::core::Tensor::NumDims(), cloudViewer::core::Tensor::To(), and cloudViewer::core::Dtype::ToString().
Referenced by pybind_contrib_nns().
Definition at line 21 of file Cloud.cpp.
References points, cloudViewer::ml::contrib::PointXYZ::x, cloudViewer::ml::contrib::PointXYZ::y, and cloudViewer::ml::contrib::PointXYZ::z.
Referenced by grid_subsampling().
Definition at line 37 of file Cloud.cpp.
References points, cloudViewer::ml::contrib::PointXYZ::x, cloudViewer::ml::contrib::PointXYZ::y, and cloudViewer::ml::contrib::PointXYZ::z.
Referenced by grid_subsampling().
| std::vector< int64_t > cloudViewer::ml::contrib::NmsCPUKernel | ( | const float * | boxes, |
| const float * | scores, | ||
| int | n, | ||
| double | nms_overlap_thresh | ||
| ) |
| boxes | (n, 5) float32. |
| scores | (n,) float32. |
| n | Number of boxes. |
| nms_overlap_thresh | When a high-score box is selected, other remaining boxes with IoU > nms_overlap_thresh will be discarded. |
Definition at line 113 of file Nms.cpp.
References AllPairsSortedIoU(), cloudViewer::utility::DivUp(), NMS_BLOCK_SIZE, and SortIndexes().
Definition at line 108 of file Cloud.h.
References cloudViewer::ml::contrib::PointXYZ::x, cloudViewer::ml::contrib::PointXYZ::y, and cloudViewer::ml::contrib::PointXYZ::z.
Definition at line 104 of file Cloud.h.
References cloudViewer::ml::contrib::PointXYZ::x, cloudViewer::ml::contrib::PointXYZ::y, and cloudViewer::ml::contrib::PointXYZ::z.
Definition at line 96 of file Cloud.h.
References cloudViewer::ml::contrib::PointXYZ::x, cloudViewer::ml::contrib::PointXYZ::y, and cloudViewer::ml::contrib::PointXYZ::z.
Definition at line 100 of file Cloud.h.
References cloudViewer::ml::contrib::PointXYZ::x, cloudViewer::ml::contrib::PointXYZ::y, and cloudViewer::ml::contrib::PointXYZ::z.
|
inline |
Definition at line 112 of file Cloud.h.
References cloudViewer::ml::contrib::PointXYZ::x, cloudViewer::ml::contrib::PointXYZ::y, and cloudViewer::ml::contrib::PointXYZ::z.
Definition at line 116 of file Cloud.h.
References cloudViewer::ml::contrib::PointXYZ::x, cloudViewer::ml::contrib::PointXYZ::y, and cloudViewer::ml::contrib::PointXYZ::z.
|
inline |
Definition at line 26 of file cuda_utils.h.
References max(), min(), OptNumThreads(), and TOTAL_THREADS.
|
inline |
Definition at line 20 of file cuda_utils.h.
References max(), min(), and TOTAL_THREADS.
Referenced by OptBlockConfig().
| void cloudViewer::ml::contrib::ordered_neighbors | ( | std::vector< PointXYZ > & | queries, |
| std::vector< PointXYZ > & | supports, | ||
| std::vector< int > & | neighbors_indices, | ||
| float | radius | ||
| ) |
TOOD: This is a temporary function for 3DML repositiory use. In the future, the native CloudViewer Python API should be improved and used.
Nearest neighbours within a given radius. For each query point, finds a set of neighbor indices whose distance is less than given radius. Modifies the neighbors_indices inplace.
Definition at line 64 of file neighbors.cpp.
References size.
|
inline |
Definition at line 125 of file IoUImpl.h.
References cloudViewer::ml::contrib::Point::x_, and cloudViewer::ml::contrib::Point::y_.
Referenced by BoxOverlap().
| void cloudViewer::ml::contrib::pybind_contrib | ( | py::module & | m | ) |
Definition at line 18 of file contrib.cpp.
References pybind_contrib_iou(), pybind_contrib_nns(), and pybind_contrib_subsample().
Referenced by cloudViewer::ml::pybind_ml().
| void cloudViewer::ml::contrib::pybind_contrib_iou | ( | py::module & | m_contrib | ) |
Definition at line 121 of file iou.cpp.
References Iou3dCPU(), and IouBevCPU().
Referenced by pybind_contrib().
| void cloudViewer::ml::contrib::pybind_contrib_nns | ( | py::module & | m_contrib | ) |
Definition at line 19 of file contrib_nns.cpp.
References KnnSearch(), and RadiusSearch().
Referenced by pybind_contrib().
| void cloudViewer::ml::contrib::pybind_contrib_subsample | ( | py::module & | m_contrib | ) |
Definition at line 346 of file contrib_subsample.cpp.
References Subsample(), and SubsampleBatch().
Referenced by pybind_contrib().
| const core::Tensor cloudViewer::ml::contrib::RadiusSearch | ( | const core::Tensor & | query_points, |
| const core::Tensor & | dataset_points, | ||
| const core::Tensor & | query_batches, | ||
| const core::Tensor & | dataset_batches, | ||
| double | radius | ||
| ) |
TOOD: This is a temory wrapper for 3DML repositiory use. In the future, the native CloudViewer Python API should be improved and used.
| query_points | Tensor of shape {n_query_points, d}, dtype Float32. |
| dataset_points | Tensor of shape {n_dataset_points, d}, dtype Float32. |
| query_batches | Tensor of shape {n_batches,}, dtype Int32. It is required that sum(query_batches) == n_query_points. |
| dataset_batches | Tensor of shape {n_batches,}, dtype Int32. It is required that that sum(dataset_batches) == n_dataset_points. |
| radius | The radius to search. |
Definition at line 51 of file contrib_nns.cpp.
References cloudViewer::core::Tensor::Add(), cloudViewer::core::Tensor::AsRvalue(), cloudViewer::core::nns::NearestNeighborSearch::FixedRadiusIndex(), cloudViewer::core::nns::NearestNeighborSearch::FixedRadiusSearch(), cloudViewer::core::Tensor::Full(), cloudViewer::core::Tensor::GetDataPtr(), cloudViewer::core::Tensor::GetDtype(), cloudViewer::core::Tensor::GetShape(), cloudViewer::core::Int32, cloudViewer::core::Int64, cloudViewer::core::Tensor::Item(), LogError, max(), cloudViewer::core::Tensor::NumDims(), result, cloudViewer::core::Tensor::Slice(), cloudViewer::core::Tensor::Sub(), cloudViewer::core::Tensor::Sum(), cloudViewer::core::Tensor::To(), cloudViewer::core::Dtype::ToString(), and cloudViewer::core::Tensor::View().
Referenced by pybind_contrib_nns().
|
inline |
Definition at line 114 of file IoUImpl.h.
References cloudViewer::ml::contrib::Point::set(), cloudViewer::ml::contrib::Point::x_, and cloudViewer::ml::contrib::Point::y_.
Referenced by BoxOverlap().
|
static |
Definition at line 25 of file Nms.cpp.
Referenced by NmsCPUKernel().
| const py::object cloudViewer::ml::contrib::Subsample | ( | py::array | points, |
| utility::optional< py::array > | features, | ||
| utility::optional< py::array > | classes, | ||
| float | sampleDl, | ||
| int | verbose | ||
| ) |
Definition at line 204 of file contrib_subsample.cpp.
References cloudViewer::core::Tensor::Contiguous(), cloudViewer::core::Float32, cloudViewer::core::Tensor::GetDataPtr(), cloudViewer::core::Tensor::GetDtype(), cloudViewer::core::Tensor::GetShape(), grid_subsampling(), cloudViewer::utility::optional< T >::has_value(), cloudViewer::core::Int32, LogError, LogInfo, cloudViewer::core::Tensor::NumDims(), cloudViewer::core::Tensor::NumElements(), points, cloudViewer::core::PyArrayToTensor(), cloudViewer::core::TensorToPyArray(), cloudViewer::core::Tensor::ToFlatVector(), cloudViewer::core::SizeVector::ToString(), and cloudViewer::utility::optional< T >::value().
Referenced by pybind_contrib_subsample().
| const py::tuple cloudViewer::ml::contrib::SubsampleBatch | ( | py::array | points, |
| py::array | batches, | ||
| utility::optional< py::array > | features, | ||
| utility::optional< py::array > | classes, | ||
| float | sampleDl, | ||
| const std::string & | method, | ||
| int | max_p, | ||
| int | verbose | ||
| ) |
Definition at line 19 of file contrib_subsample.cpp.
References batch_grid_subsampling(), cloudViewer::core::Tensor::Contiguous(), cloudViewer::core::Float32, cloudViewer::core::Tensor::GetDataPtr(), cloudViewer::core::Tensor::GetDtype(), cloudViewer::core::Tensor::GetShape(), cloudViewer::utility::optional< T >::has_value(), cloudViewer::core::Int32, cloudViewer::core::Tensor::Item(), LogError, LogInfo, cloudViewer::core::Tensor::NumDims(), cloudViewer::core::Tensor::NumElements(), points, cloudViewer::core::PyArrayToTensor(), cloudViewer::core::Tensor::Sum(), cloudViewer::core::TensorToPyArray(), cloudViewer::core::Tensor::ToFlatVector(), cloudViewer::core::SizeVector::ToString(), and cloudViewer::utility::optional< T >::value().
Referenced by pybind_contrib_subsample().
|
constexpr |
Definition at line 20 of file IoUImpl.h.
Referenced by Factor(), Intersection(), IoUBev2DWithMinAndMax(), cloudViewer::utility::IntersectionTest::LinesMinimumDistance(), and cloudViewer::t::geometry::TriangleMesh::ProjectImagesToAlbedo().
|
constexpr |
Definition at line 19 of file IoUImpl.h.
Referenced by AllPairsSortedIoU(), and NmsCPUKernel().