Open3D (C++ API)  0.13.0
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
PointCloud.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - Open3D: www.open3d.org -
3 // ----------------------------------------------------------------------------
4 // The MIT License (MIT)
5 //
6 // Copyright (c) 2018 www.open3d.org
7 //
8 // Permission is hereby granted, free of charge, to any person obtaining a copy
9 // of this software and associated documentation files (the "Software"), to deal
10 // in the Software without restriction, including without limitation the rights
11 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 // copies of the Software, and to permit persons to whom the Software is
13 // furnished to do so, subject to the following conditions:
14 //
15 // The above copyright notice and this permission notice shall be included in
16 // all copies or substantial portions of the Software.
17 //
18 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
24 // IN THE SOFTWARE.
25 // ----------------------------------------------------------------------------
26 
27 #pragma once
28 
29 #include <unordered_map>
30 
31 #include "open3d/core/Tensor.h"
32 
33 namespace open3d {
34 namespace t {
35 namespace geometry {
36 namespace kernel {
37 namespace pointcloud {
38 
39 void Unproject(const core::Tensor& depth,
40  utility::optional<std::reference_wrapper<const core::Tensor>>
41  image_colors,
42  core::Tensor& points,
43  utility::optional<std::reference_wrapper<core::Tensor>> colors,
44  const core::Tensor& intrinsics,
45  const core::Tensor& extrinsics,
46  float depth_scale,
47  float depth_max,
48  int64_t stride);
49 
50 void Project(
51  core::Tensor& depth,
52  utility::optional<std::reference_wrapper<core::Tensor>> image_colors,
53  const core::Tensor& points,
54  utility::optional<std::reference_wrapper<const core::Tensor>> colors,
55  const core::Tensor& intrinsics,
56  const core::Tensor& extrinsics,
57  float depth_scale,
58  float depth_max);
59 
60 void UnprojectCPU(
61  const core::Tensor& depth,
62  utility::optional<std::reference_wrapper<const core::Tensor>>
63  image_colors,
64  core::Tensor& points,
65  utility::optional<std::reference_wrapper<core::Tensor>> colors,
66  const core::Tensor& intrinsics,
67  const core::Tensor& extrinsics,
68  float depth_scale,
69  float depth_max,
70  int64_t stride);
71 
72 void ProjectCPU(
73  core::Tensor& depth,
74  utility::optional<std::reference_wrapper<core::Tensor>> image_colors,
75  const core::Tensor& points,
76  utility::optional<std::reference_wrapper<const core::Tensor>> colors,
77  const core::Tensor& intrinsics,
78  const core::Tensor& extrinsics,
79  float depth_scale,
80  float depth_max);
81 
82 #ifdef BUILD_CUDA_MODULE
83 void UnprojectCUDA(
84  const core::Tensor& depth,
85  utility::optional<std::reference_wrapper<const core::Tensor>>
86  image_colors,
87  core::Tensor& points,
88  utility::optional<std::reference_wrapper<core::Tensor>> colors,
89  const core::Tensor& intrinsics,
90  const core::Tensor& extrinsics,
91  float depth_scale,
92  float depth_max,
93  int64_t stride);
94 
95 void ProjectCUDA(
96  core::Tensor& depth,
97  utility::optional<std::reference_wrapper<core::Tensor>> image_colors,
98  const core::Tensor& points,
99  utility::optional<std::reference_wrapper<const core::Tensor>> colors,
100  const core::Tensor& intrinsics,
101  const core::Tensor& extrinsics,
102  float depth_scale,
103  float depth_max);
104 #endif
105 
106 } // namespace pointcloud
107 } // namespace kernel
108 } // namespace geometry
109 } // namespace t
110 } // namespace open3d
size_t stride
Definition: TriangleMeshBuffers.cpp:183
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:53
int points
Definition: FilePCD.cpp:73
Definition: PinholeCameraIntrinsic.cpp:35
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)
Definition: PointCloud.cpp:42
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)
Definition: PointCloud.cpp:78
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)
Definition: PointCloudCPU.cpp:45