![]() |
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) |
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().
| 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(), 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 e, 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 a, cloudViewer::ml::contrib::Point::x_, and cloudViewer::ml::contrib::Point::y_.
Referenced by Annotation::adjustToAnchor(), BoxOverlap(), vtkPVJoystickFly::ComputeCameraAxes(), Intersection(), vtkPVTrackballPan::OnMouseMove(), vtkTrackballPan::OnMouseMove(), vtkPVTrackballRotate::OnMouseMove(), vtkPVImageInteractorStyle::Pan(), CustomVtkBoxWidget::Rotate(), and vtkBoxWidgetRestricted::Rotate().
|
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 a, count, data, float, 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().
|
inline |
Definition at line 78 of file IoUImpl.h.
References CheckRectCross(), Cross(), EPS, cloudViewer::ml::contrib::Point::x_, and cloudViewer::ml::contrib::Point::y_.
Referenced by BoxOverlap().
|
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(), and EPS.
Referenced by IoUBev2DWithCenterAndSize().
| 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().
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 a, 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 a, 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 OptNumThreads(), TOTAL_THREADS, x, and y.
|
inline |
Definition at line 20 of file cuda_utils.h.
References 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 Utils::distance(), and size.
|
inline |
Definition at line 125 of file IoUImpl.h.
References a, cloudViewer::ml::contrib::Point::x_, and cloudViewer::ml::contrib::Point::y_.
Referenced by BoxOverlap().
| 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, 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().
|
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().
Definition at line 20 of file IoUImpl.h.
Referenced by 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().