49 namespace pointcloud {
58 #if defined(__CUDACC__) 74 const bool have_colors = image_colors.has_value();
90 const auto& imcol = image_colors.value().get();
92 colors.value().get() =
core::Tensor({rows_strided * cols_strided, 3},
98 #if defined(__CUDACC__) 100 int* count_ptr =
count.GetDataPtr<
int>();
102 std::atomic<int> count_atomic(0);
103 std::atomic<int>* count_ptr = &count_atomic;
106 int64_t n = rows_strided * cols_strided;
111 int64_t y = (workload_idx / cols_strided) *
stride;
112 int64_t x = (workload_idx % cols_strided) *
stride;
114 float d = *depth_indexer.
GetDataPtr<scalar_t>(x, y) /
116 if (d > 0 && d < depth_max) {
119 float x_c = 0, y_c = 0, z_c = 0;
121 static_cast<float>(y), d, &x_c, &y_c,
124 float* vertex = point_indexer.GetDataPtr<
float>(idx);
133 *pcd_pixel = *image_pixel;
134 *(pcd_pixel + 1) = *(image_pixel + 1);
135 *(pcd_pixel + 2) = *(image_pixel + 2);
140 #if defined(__CUDACC__) 141 int total_pts_count =
count.Item<
int>();
143 int total_pts_count = (*count_ptr).load();
149 points = points.Slice(0, 0, total_pts_count);
151 colors.value().get() =
152 colors.value().get().Slice(0, 0, total_pts_count);
158 template <
typename scalar_t>
160 const scalar_t* points_ptr,
163 scalar_t* covariance_ptr) {
164 if (indices_count < 3) {
165 covariance_ptr[0] = 1.0;
166 covariance_ptr[1] = 0.0;
167 covariance_ptr[2] = 0.0;
168 covariance_ptr[3] = 0.0;
169 covariance_ptr[4] = 1.0;
170 covariance_ptr[5] = 0.0;
171 covariance_ptr[6] = 0.0;
172 covariance_ptr[7] = 0.0;
173 covariance_ptr[8] = 1.0;
177 double centroid[3] = {0};
178 for (
int32_t i = 0; i < indices_count; ++i) {
179 int32_t idx = 3 * indices_ptr[i];
180 centroid[0] += points_ptr[idx];
181 centroid[1] += points_ptr[idx + 1];
182 centroid[2] += points_ptr[idx + 2];
185 centroid[0] /= indices_count;
186 centroid[1] /= indices_count;
187 centroid[2] /= indices_count;
190 double cumulants[6] = {0};
191 for (
int32_t i = 0; i < indices_count; ++i) {
192 int32_t idx = 3 * indices_ptr[i];
193 const double x =
static_cast<double>(points_ptr[idx]) - centroid[0];
194 const double y =
static_cast<double>(points_ptr[idx + 1]) - centroid[1];
195 const double z =
static_cast<double>(points_ptr[idx + 2]) - centroid[2];
197 cumulants[0] += x * x;
198 cumulants[1] += y * y;
199 cumulants[2] += z * z;
201 cumulants[3] += x * y;
202 cumulants[4] += x * z;
203 cumulants[5] += y * z;
208 const double normalization_factor =
static_cast<double>(indices_count - 1);
209 for (
int i = 0; i < 6; ++i) {
210 cumulants[i] /= normalization_factor;
214 covariance_ptr[0] =
static_cast<scalar_t
>(cumulants[0]);
216 covariance_ptr[4] =
static_cast<scalar_t
>(cumulants[1]);
218 covariance_ptr[8] =
static_cast<scalar_t
>(cumulants[2]);
221 covariance_ptr[1] =
static_cast<scalar_t
>(cumulants[3]);
222 covariance_ptr[3] = covariance_ptr[1];
225 covariance_ptr[2] =
static_cast<scalar_t
>(cumulants[4]);
226 covariance_ptr[6] = covariance_ptr[2];
229 covariance_ptr[5] =
static_cast<scalar_t
>(cumulants[5]);
230 covariance_ptr[7] = covariance_ptr[5];
233 #if defined(__CUDACC__) 234 void EstimateCovariancesUsingHybridSearchCUDA
240 const double& radius,
241 const int64_t& max_nn) {
252 std::tie(indices, distance, counts) =
256 const scalar_t* points_ptr = points.
GetDataPtr<scalar_t>();
259 scalar_t* covariances_ptr = covariances.GetDataPtr<scalar_t>();
264 const int32_t neighbour_offset = max_nn * workload_idx;
266 const int32_t neighbour_count =
267 neighbour_counts_ptr[workload_idx];
270 const int32_t covariances_offset = 9 * workload_idx;
274 neighbour_indices_ptr + neighbour_offset,
276 covariances_ptr + covariances_offset);
283 #if defined(__CUDACC__) 284 void EstimateCovariancesUsingKNNSearchCUDA
290 const int64_t& max_nn) {
301 std::tie(indices, distance) = tree.
KnnSearch(points, max_nn);
308 "Not enought neighbors to compute Covariances / Normals. Try " 309 "increasing the max_nn parameter.");
313 auto points_ptr = points.
GetDataPtr<scalar_t>();
315 auto covariances_ptr = covariances.GetDataPtr<scalar_t>();
320 const int32_t neighbour_offset = nn_count * workload_idx;
323 const int32_t covariances_offset = 9 * workload_idx;
327 neighbour_indices_ptr + neighbour_offset, nn_count,
328 covariances_ptr + covariances_offset);
335 template <
typename scalar_t>
337 const scalar_t eval0,
338 scalar_t* eigen_vector0) {
339 scalar_t row0[3] = {A[0] - eval0, A[1], A[2]};
340 scalar_t row1[3] = {A[1], A[4] - eval0, A[5]};
341 scalar_t row2[3] = {A[2], A[5], A[8] - eval0};
343 scalar_t r0xr1[3], r0xr2[3], r1xr2[3];
364 scalar_t sqrt_d = sqrt(d0);
365 eigen_vector0[0] = r0xr1[0] / sqrt_d;
366 eigen_vector0[1] = r0xr1[1] / sqrt_d;
367 eigen_vector0[2] = r0xr1[2] / sqrt_d;
369 }
else if (imax == 1) {
370 scalar_t sqrt_d = sqrt(d1);
371 eigen_vector0[0] = r0xr2[0] / sqrt_d;
372 eigen_vector0[1] = r0xr2[1] / sqrt_d;
373 eigen_vector0[2] = r0xr2[2] / sqrt_d;
376 scalar_t sqrt_d = sqrt(d2);
377 eigen_vector0[0] = r1xr2[0] / sqrt_d;
378 eigen_vector0[1] = r1xr2[1] / sqrt_d;
379 eigen_vector0[2] = r1xr2[2] / sqrt_d;
384 template <
typename scalar_t>
386 const scalar_t* evec0,
387 const scalar_t eval1,
388 scalar_t* eigen_vector1) {
390 if (abs(evec0[0]) > abs(evec0[1])) {
391 scalar_t inv_length =
392 1.0 / sqrt(evec0[0] * evec0[0] + evec0[2] * evec0[2]);
393 U[0] = -evec0[2] * inv_length;
395 U[2] = evec0[0] * inv_length;
397 scalar_t inv_length =
398 1.0 / sqrt(evec0[1] * evec0[1] + evec0[2] * evec0[2]);
400 U[1] = evec0[2] * inv_length;
401 U[2] = -evec0[1] * inv_length;
403 scalar_t V[3], AU[3], AV[3];
405 core::linalg::kernel::matmul3x3_3x1(A, U, AU);
406 core::linalg::kernel::matmul3x3_3x1(A, V, AV);
412 scalar_t absM00 = abs(m00);
413 scalar_t absM01 = abs(m01);
414 scalar_t absM11 = abs(m11);
415 scalar_t max_abs_comp;
417 if (absM00 >= absM11) {
418 max_abs_comp = max(absM00, absM01);
419 if (max_abs_comp > 0) {
420 if (absM00 >= absM01) {
422 m00 = 1 / sqrt(1 + m01 * m01);
426 m01 = 1 / sqrt(1 + m00 * m00);
429 eigen_vector1[0] = m01 * U[0] - m00 * V[0];
430 eigen_vector1[1] = m01 * U[1] - m00 * V[1];
431 eigen_vector1[2] = m01 * U[2] - m00 * V[2];
434 eigen_vector1[0] = U[0];
435 eigen_vector1[1] = U[1];
436 eigen_vector1[2] = U[2];
440 max_abs_comp = max(absM11, absM01);
441 if (max_abs_comp > 0) {
442 if (absM11 >= absM01) {
444 m11 = 1 / sqrt(1 + m01 * m01);
448 m01 = 1 / sqrt(1 + m11 * m11);
451 eigen_vector1[0] = m11 * U[0] - m01 * V[0];
452 eigen_vector1[1] = m11 * U[1] - m01 * V[1];
453 eigen_vector1[2] = m11 * U[2] - m01 * V[2];
456 eigen_vector1[0] = U[0];
457 eigen_vector1[1] = U[1];
458 eigen_vector1[2] = U[2];
464 template <
typename scalar_t>
466 const scalar_t* covariance_ptr, scalar_t* normals_ptr) {
470 scalar_t max_coeff = covariance_ptr[0];
472 for (
int i = 1; i < 9; ++i) {
473 if (max_coeff < covariance_ptr[i]) {
474 max_coeff = covariance_ptr[i];
478 if (max_coeff == 0) {
479 normals_ptr[0] = 0.0;
480 normals_ptr[1] = 0.0;
481 normals_ptr[2] = 0.0;
487 for (
int i = 0; i < 9; ++i) {
488 A[i] = covariance_ptr[i] / max_coeff;
491 scalar_t norm = A[1] * A[1] + A[2] * A[2] + A[5] * A[5];
499 scalar_t q = (A[0] + A[4] + A[8]) / 3.0;
501 scalar_t b00 = A[0] - q;
502 scalar_t b11 = A[4] - q;
503 scalar_t b22 = A[8] - q;
506 sqrt((b00 * b00 + b11 * b11 + b22 * b22 + norm * 2.0) / 6.0);
508 scalar_t c00 = b11 * b22 - A[5] * A[5];
509 scalar_t c01 = A[1] * b22 - A[5] * A[2];
510 scalar_t c02 = A[1] * A[5] - b11 * A[2];
511 scalar_t det = (b00 * c00 - A[1] * c01 + A[2] * c02) / (p * p * p);
513 scalar_t half_det = det * 0.5;
514 half_det = min(max(half_det, static_cast<scalar_t>(-1.0)),
515 static_cast<scalar_t>(1.0));
517 scalar_t angle = acos(half_det) / 3.0;
518 const scalar_t two_thrids_pi = 2.09439510239319549;
520 scalar_t beta2 = cos(angle) * 2.0;
521 scalar_t beta0 = cos(angle + two_thrids_pi) * 2.0;
522 scalar_t beta1 = -(beta0 + beta2);
524 eval[0] = q + p * beta0;
525 eval[1] = q + p * beta1;
526 eval[2] = q + p * beta2;
529 ComputeEigenvector0<scalar_t>(A, eval[2], evec2);
531 if (eval[2] < eval[0] && eval[2] < eval[1]) {
532 normals_ptr[0] = evec2[0];
533 normals_ptr[1] = evec2[1];
534 normals_ptr[2] = evec2[2];
539 ComputeEigenvector1<scalar_t>(A, evec2, eval[1], evec1);
541 if (eval[1] < eval[0] && eval[1] < eval[2]) {
542 normals_ptr[0] = evec1[0];
543 normals_ptr[1] = evec1[1];
544 normals_ptr[2] = evec1[2];
549 normals_ptr[0] = evec1[1] * evec2[2] - evec1[2] * evec2[1];
550 normals_ptr[1] = evec1[2] * evec2[0] - evec1[0] * evec2[2];
551 normals_ptr[2] = evec1[0] * evec2[1] - evec1[1] * evec2[0];
555 ComputeEigenvector0<scalar_t>(A, eval[0], evec0);
557 if (eval[0] < eval[1] && eval[0] < eval[2]) {
558 normals_ptr[0] = evec0[0];
559 normals_ptr[1] = evec0[1];
560 normals_ptr[2] = evec0[2];
564 ComputeEigenvector1<scalar_t>(A, evec0, eval[1], evec1);
566 if (eval[1] < eval[0] && eval[1] < eval[2]) {
567 normals_ptr[0] = evec1[0];
568 normals_ptr[1] = evec1[1];
569 normals_ptr[2] = evec1[2];
573 normals_ptr[0] = evec0[1] * evec1[2] - evec0[2] * evec1[1];
574 normals_ptr[1] = evec0[2] * evec1[0] - evec0[0] * evec1[2];
575 normals_ptr[2] = evec0[0] * evec1[1] - evec0[1] * evec1[0];
579 if (covariance_ptr[0] < covariance_ptr[4] &&
580 covariance_ptr[0] < covariance_ptr[8]) {
581 normals_ptr[0] = 1.0;
582 normals_ptr[1] = 0.0;
583 normals_ptr[2] = 0.0;
585 }
else if (covariance_ptr[0] < covariance_ptr[4] &&
586 covariance_ptr[0] < covariance_ptr[8]) {
587 normals_ptr[0] = 0.0;
588 normals_ptr[1] = 1.0;
589 normals_ptr[2] = 0.0;
592 normals_ptr[0] = 0.0;
593 normals_ptr[1] = 0.0;
594 normals_ptr[2] = 1.0;
600 #if defined(__CUDACC__) 601 void EstimateNormalsFromCovariancesCUDA
612 const scalar_t* covariances_ptr = covariances.
GetDataPtr<scalar_t>();
613 scalar_t* normals_ptr = normals.GetDataPtr<scalar_t>();
618 int32_t covariances_offset = 9 * workload_idx;
619 int32_t normals_offset = 3 * workload_idx;
620 scalar_t normals_output[3] = {0};
621 EstimatePointWiseNormalsWithFastEigen3x3<scalar_t>(
622 covariances_ptr + covariances_offset,
625 if ((normals_output[0] * normals_output[0] +
626 normals_output[1] * normals_output[1] +
627 normals_output[2] * normals_output[2]) == 0.0 &&
629 normals_output[0] = 0.0;
630 normals_output[1] = 0.0;
631 normals_output[2] = 1.0;
634 if ((normals_ptr[normals_offset] * normals_output[0] +
635 normals_ptr[normals_offset + 1] *
637 normals_ptr[normals_offset + 2] *
638 normals_output[2]) < 0.0) {
639 normals_output[0] *= -1;
640 normals_output[1] *= -1;
641 normals_output[2] *= -1;
645 normals_ptr[normals_offset] = normals_output[0];
646 normals_ptr[normals_offset + 1] = normals_output[1];
647 normals_ptr[normals_offset + 2] = normals_output[2];
654 template <
typename scalar_t>
656 const scalar_t* points_ptr,
657 const scalar_t* normals_ptr,
658 const scalar_t* colors_ptr,
662 scalar_t* color_gradients_ptr) {
663 if (indices_count < 4) {
664 color_gradients_ptr[idx_offset] = 0;
665 color_gradients_ptr[idx_offset + 1] = 0;
666 color_gradients_ptr[idx_offset + 2] = 0;
668 scalar_t vt[3] = {points_ptr[idx_offset], points_ptr[idx_offset + 1],
669 points_ptr[idx_offset + 2]};
671 scalar_t nt[3] = {normals_ptr[idx_offset], normals_ptr[idx_offset + 1],
672 normals_ptr[idx_offset + 2]};
674 scalar_t it = (colors_ptr[idx_offset] + colors_ptr[idx_offset + 1] +
675 colors_ptr[idx_offset + 2]) /
678 scalar_t AtA[9] = {0};
679 scalar_t Atb[3] = {0};
689 scalar_t s = vt[0] * nt[0] + vt[1] * nt[1] + vt[2] * nt[2];
692 for (; i < indices_count; i++) {
693 int64_t neighbour_idx_offset = 3 * indices_ptr[i];
695 if (neighbour_idx_offset == -1) {
699 scalar_t vt_adj[3] = {points_ptr[neighbour_idx_offset],
700 points_ptr[neighbour_idx_offset + 1],
701 points_ptr[neighbour_idx_offset + 2]};
705 scalar_t d = vt_adj[0] * nt[0] + vt_adj[1] * nt[1] +
706 vt_adj[2] * nt[2] - s;
709 scalar_t vt_proj[3] = {vt_adj[0] - d * nt[0], vt_adj[1] - d * nt[1],
710 vt_adj[2] - d * nt[2]};
712 scalar_t it_adj = (colors_ptr[neighbour_idx_offset + 0] +
713 colors_ptr[neighbour_idx_offset + 1] +
714 colors_ptr[neighbour_idx_offset + 2]) /
717 scalar_t A[3] = {vt_proj[0] - vt[0], vt_proj[1] - vt[1],
720 AtA[0] += A[0] * A[0];
721 AtA[1] += A[1] * A[0];
722 AtA[2] += A[2] * A[0];
723 AtA[4] += A[1] * A[1];
724 AtA[5] += A[2] * A[1];
725 AtA[8] += A[2] * A[2];
727 scalar_t b = it_adj - it;
735 scalar_t A[3] = {(i - 1) * nt[0], (i - 1) * nt[1], (i - 1) * nt[2]};
737 AtA[0] += A[0] * A[0];
738 AtA[1] += A[0] * A[1];
739 AtA[2] += A[0] * A[2];
740 AtA[4] += A[1] * A[1];
741 AtA[5] += A[1] * A[2];
742 AtA[8] += A[2] * A[2];
750 color_gradients_ptr + idx_offset);
754 #if defined(__CUDACC__) 755 void EstimateColorGradientsUsingHybridSearchCUDA
763 const double& radius,
764 const int64_t& max_nn) {
773 "NearestNeighborSearch::FixedRadiusIndex Index is not set.");
777 std::tie(indices, distance, counts) =
781 auto points_ptr = points.
GetDataPtr<scalar_t>();
782 auto normals_ptr = normals.GetDataPtr<scalar_t>();
783 auto colors_ptr = colors.GetDataPtr<scalar_t>();
786 auto color_gradients_ptr = color_gradients.GetDataPtr<scalar_t>();
791 int32_t neighbour_offset = max_nn * workload_idx;
794 neighbour_counts_ptr[workload_idx];
795 int32_t idx_offset = 3 * workload_idx;
798 points_ptr, normals_ptr, colors_ptr, idx_offset,
799 neighbour_indices_ptr + neighbour_offset,
800 neighbour_count, color_gradients_ptr);
807 #if defined(__CUDACC__) 808 void EstimateColorGradientsUsingKNNSearchCUDA
816 const int64_t& max_nn) {
828 std::tie(indices, distance) = tree.
KnnSearch(points, max_nn);
831 int64_t nn_count = indices.
GetShape()[1];
835 "Not enought neighbors to compute Covariances / Normals. Try " 836 "changing the search parameter.");
840 auto points_ptr = points.
GetDataPtr<scalar_t>();
841 auto normals_ptr = normals.GetDataPtr<scalar_t>();
842 auto colors_ptr = colors.GetDataPtr<scalar_t>();
844 auto color_gradients_ptr = color_gradients.GetDataPtr<scalar_t>();
848 int32_t neighbour_offset = max_nn * workload_idx;
849 int32_t idx_offset = 3 * workload_idx;
852 points_ptr, normals_ptr, colors_ptr, idx_offset,
853 neighbour_indices_ptr + neighbour_offset, nn_count,
854 color_gradients_ptr);
OPEN3D_DEVICE OPEN3D_FORCE_INLINE void solve_svd3x3(const scalar_t *A_3x3, const scalar_t *B_3x1, scalar_t *X_3x1)
Definition: SVD3x3.h:2190
OPEN3D_HOST_DEVICE index_t GetShape(int i) const
Definition: GeometryIndexer.h:331
TArrayIndexer< int64_t > NDArrayIndexer
Definition: GeometryIndexer.h:380
Definition: GeometryIndexer.h:180
OPEN3D_HOST_DEVICE void ComputeEigenvector0(const scalar_t *A, const scalar_t eval0, scalar_t *eigen_vector0)
Definition: PointCloudImpl.h:336
std::tuple< Tensor, Tensor, Tensor > HybridSearch(const Tensor &query_points, double radius, int max_knn)
Definition: NearestNeighborSearch.cpp:149
OPEN3D_HOST_DEVICE void * GetDataPtr() const
Definition: GeometryIndexer.h:335
OPEN3D_HOST_DEVICE OPEN3D_FORCE_INLINE void cross_3x1(const scalar_t *A_3x1_input, const scalar_t *B_3x1_input, scalar_t *C_3x1_output)
Definition: Matrix.h:82
bool HybridIndex(utility::optional< double > radius={})
Definition: NearestNeighborSearch.cpp:79
void ParallelFor(const Device &device, int64_t n, const func_t &func)
Definition: ParallelFor.h:122
const char const char value recording_handle imu_sample recording_handle uint8_t size_t data_size k4a_record_configuration_t config target_format k4a_capture_t capture_handle k4a_imu_sample_t imu_sample playback_handle k4a_logging_message_cb_t void min_level device_handle k4a_imu_sample_t int32_t
Definition: K4aPlugin.cpp:408
OPEN3D_HOST_DEVICE OPEN3D_FORCE_INLINE scalar_t dot_3x1(const scalar_t *A_3x1_input, const scalar_t *B_3x1_input)
Definition: Matrix.h:96
const Dtype Float32
Definition: Dtype.cpp:61
OPEN3D_HOST_DEVICE void EstimatePointWiseNormalsWithFastEigen3x3(const scalar_t *covariance_ptr, scalar_t *normals_ptr)
Definition: PointCloudImpl.h:465
OPEN3D_HOST_DEVICE void EstimatePointWiseColorGradientKernel(const scalar_t *points_ptr, const scalar_t *normals_ptr, const scalar_t *colors_ptr, const int32_t &idx_offset, const int32_t *indices_ptr, const int32_t &indices_count, scalar_t *color_gradients_ptr)
Definition: PointCloudImpl.h:655
void EstimateColorGradientsUsingHybridSearchCPU(const core::Tensor &points, const core::Tensor &normals, const core::Tensor &colors, core::Tensor &color_gradient, const double &radius, const int64_t &max_nn)
Definition: PointCloudImpl.h:759
Device GetDevice() const
Definition: Tensor.cpp:1365
Dtype GetDtype() const
Definition: Tensor.h:1128
#define OPEN3D_DEVICE
Definition: CUDAUtils.h:64
#define OPEN3D_ATOMIC_ADD(X, Y)
Definition: GeometryMacros.h:58
void Synchronize()
Definition: CUDAUtils.cpp:78
#define OPEN3D_HOST_DEVICE
Definition: CUDAUtils.h:63
core::Tensor InverseTransformation(const core::Tensor &T)
TODO(wei): find a proper place for such functionalities.
Definition: Utility.h:96
const Dtype Int32
Definition: Dtype.cpp:65
void EstimateCovariancesUsingHybridSearchCPU(const core::Tensor &points, core::Tensor &covariances, const double &radius, const int64_t &max_nn)
Definition: PointCloudImpl.h:238
OPEN3D_HOST_DEVICE void EstimatePointWiseRobustNormalizedCovarianceKernel(const scalar_t *points_ptr, const int32_t *indices_ptr, const int32_t &indices_count, scalar_t *covariance_ptr)
Definition: PointCloudImpl.h:159
Tensor To(Dtype dtype, bool copy=false) const
Definition: Tensor.cpp:713
Tensor Contiguous() const
Definition: Tensor.cpp:746
A Class for nearest neighbor search.
Definition: NearestNeighborSearch.h:44
size_t stride
Definition: TriangleMeshBuffers.cpp:184
Definition: Optional.h:79
SizeVector GetShape() const
Definition: Tensor.h:1091
std::pair< Tensor, Tensor > KnnSearch(const Tensor &query_points, int knn)
Definition: NearestNeighborSearch.cpp:98
void UnprojectCPU(const core::Tensor &depth, utility::optional< std::reference_wrapper< const core::Tensor >> image_colors, core::Tensor &points, utility::optional< std::reference_wrapper< core::Tensor >> colors, const core::Tensor &intrinsics, const core::Tensor &extrinsics, float depth_scale, float depth_max, int64_t stride)
Definition: PointCloudImpl.h:63
#define DISPATCH_DTYPE_TO_TEMPLATE(DTYPE,...)
Definition: Dispatch.h:49
void EstimateCovariancesUsingKNNSearchCPU(const core::Tensor &points, core::Tensor &covariances, const int64_t &max_nn)
Definition: PointCloudImpl.h:288
Definition: PinholeCameraIntrinsic.cpp:35
void EstimateNormalsFromCovariancesCPU(const core::Tensor &covariances, core::Tensor &normals, const bool has_normals)
Definition: PointCloudImpl.h:605
void EstimateColorGradientsUsingKNNSearchCPU(const core::Tensor &points, const core::Tensor &normals, const core::Tensor &colors, core::Tensor &color_gradient, const int64_t &max_nn)
Definition: PointCloudImpl.h:812
OPEN3D_HOST_DEVICE void ComputeEigenvector1(const scalar_t *A, const scalar_t *evec0, const scalar_t eval1, scalar_t *eigen_vector1)
Definition: PointCloudImpl.h:385
#define DISPATCH_FLOAT_DTYPE_TO_TEMPLATE(DTYPE,...)
Definition: Dispatch.h:96
T * GetDataPtr()
Definition: Tensor.h:1108
int64_t GetLength() const
Definition: Tensor.h:1089
bool KnnIndex()
Definition: NearestNeighborSearch.cpp:42
#define LogError(...)
Definition: Logging.h:67