22 namespace pointcloud {
34 if (image_colors.has_value() !=
colors.has_value()) {
36 "Both or none of image_colors and colors must have values.");
48 if (image_colors.has_value()) {
54 extrinsics_d, depth_scale, depth_max,
stride);
55 }
else if (depth.
IsCUDA()) {
57 intrinsics_d, extrinsics_d, depth_scale, depth_max,
stride);
72 if (image_colors.has_value() !=
colors.has_value()) {
74 "Both or none of image_colors and colors must have values.");
86 if (image_colors.has_value()) {
92 extrinsics_d, depth_scale, depth_max);
93 }
else if (depth.
IsCUDA()) {
95 intrinsics_d, extrinsics_d, depth_scale, depth_max);
118 }
else if (mask.
IsCUDA()) {
119 CUDA_CALL(GetPointMaskWithinAABBCUDA, points_d, min_bound_d,
143 }
else if (mask.
IsCUDA()) {
144 CUDA_CALL(GetPointMaskWithinOBBCUDA, points_d, center_d, rotation_d,
#define CUDA_CALL(cuda_function,...)
#define AssertTensorDevice(tensor,...)
#define AssertTensorDtype(tensor,...)
#define AssertTensorShape(tensor,...)
Tensor Contiguous() const
Device GetDevice() const override
Tensor To(Dtype dtype, bool copy=false) const
void Project(core::Tensor &depth, utility::optional< std::reference_wrapper< core::Tensor >> image_colors, const core::Tensor &points, utility::optional< std::reference_wrapper< const core::Tensor >> colors, const core::Tensor &intrinsics, const core::Tensor &extrinsics, float depth_scale, float depth_max)
void GetPointMaskWithinOBBCPU(const core::Tensor &points, const core::Tensor ¢er, const core::Tensor &rotation, const core::Tensor &extent, core::Tensor &mask)
void ProjectCPU(core::Tensor &depth, utility::optional< std::reference_wrapper< core::Tensor >> image_colors, const core::Tensor &points, utility::optional< std::reference_wrapper< const core::Tensor >> colors, const core::Tensor &intrinsics, const core::Tensor &extrinsics, float depth_scale, float depth_max)
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)
void GetPointMaskWithinAABB(const core::Tensor &points, const core::Tensor &min_bound, const core::Tensor &max_bound, core::Tensor &mask)
void GetPointMaskWithinOBB(const core::Tensor &points, const core::Tensor ¢er, const core::Tensor &rotation, const core::Tensor &extent, core::Tensor &mask)
void Unproject(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)
void GetPointMaskWithinAABBCPU(const core::Tensor &points, const core::Tensor &min_bound, const core::Tensor &max_bound, core::Tensor &mask)
Generic file read and write utility for python interface.