 |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
Go to the documentation of this file.
45 int64_t grid_count = 1000,
105 return ctr_hashmap_->GetKeyTensor().To(
core::Float32) * grid_size_;
112 std::shared_ptr<core::HashMap>
GetHashMap() {
return ctr_hashmap_; }
113 int64_t
Size() {
return ctr_hashmap_->Size(); }
120 int64_t anchor_idx_ = 0;
126 std::shared_ptr<core::HashMap> ctr_hashmap_;
Generic file read and write utility for python interface.
Definition: CloudViewerConfig.cpp:12
geometry::PointCloud Parameterize(const geometry::PointCloud &pcd)
Definition: ControlGrid.cpp:150
Eigen::Matrix< Index, 4, 1 > Vector4i
Definition: knncpp.h:31
static const std::string kGrid8NbIndices
Definition: ControlGrid.h:34
int64_t GetLength() const
Definition: Tensor.h:1125
void SetPointPositions(const core::Tensor &value)
Set the value of the "positions" attribute. Convenience function.
Definition: PointCloud.h:186
Image depth_
The depth image.
Definition: RGBDImage.h:106
core::Tensor & GetPointNormals()
Get the value of the "normals" attribute. Convenience function.
Definition: PointCloud.h:130
std::shared_ptr< core::HashMap > GetHashMap()
Definition: ControlGrid.h:112
Tensor Contiguous() const
Definition: Tensor.cpp:772
core::Tensor & GetPointColors()
Get the value of the "colors" attribute. Convenience function.
Definition: PointCloud.h:127
static const std::string kGrid8NbNormalInterpRatios
8 neighbor grid interpolation ratio for normal per point.
Definition: ControlGrid.h:38
The Image class stores image with customizable rows, cols, channels, dtype and device.
Definition: Image.h:29
Tensor View(const SizeVector &dst_shape) const
Definition: Tensor.cpp:721
bool HasPointColors() const
Definition: PointCloud.h:227
int64_t GetRows() const
Get the number of rows of the image.
Definition: Image.h:84
static PointCloud CreateFromDepthImage(const Image &depth, const core::Tensor &intrinsics, const core::Tensor &extrinsics=core::Tensor::Eye(4, core::Float32, core::Device("CPU:0")), float depth_scale=1000.0f, float depth_max=3.0f, int stride=1, bool with_normals=false)
Factory function to create a point cloud from a depth image and a camera model.
Definition: PointCloud.cpp:956
Tensor GetItem(const TensorKey &tk) const
Definition: Tensor.cpp:473
geometry::Image ProjectToDepthImage(int width, int height, const core::Tensor &intrinsics, const core::Tensor &extrinsics=core::Tensor::Eye(4, core::Float32, core::Device("CPU:0")), float depth_scale=1000.0f, float depth_max=3.0f)
Project a point cloud to a depth image.
Definition: PointCloud.cpp:1013
core::Tensor GetInitPositions()
Get control grid original positions directly from tensor keys.
Definition: ControlGrid.h:104
A point cloud contains a list of 3D points.
Definition: PointCloud.h:82
ControlGrid()=default
Default constructor.
bool HasPointNormals() const
Definition: PointCloud.h:234
Definition: ControlGrid.h:30
core::Tensor GetCurrPositions()
Definition: ControlGrid.h:110
constexpr utility::nullopt_t None
Definition: TensorKey.h:20
int64_t Size()
Definition: ControlGrid.h:113
geometry::RGBDImage ProjectToRGBDImage(int width, int height, const core::Tensor &intrinsics, const core::Tensor &extrinsics=core::Tensor::Eye(4, core::Float32, core::Device("CPU:0")), float depth_scale=1000.0f, float depth_max=3.0f)
Project a point cloud to an RGBD image.
Definition: PointCloud.cpp:1036
const Dtype Int32
Definition: Dtype.cpp:46
static TensorKey Index(int64_t index)
Definition: TensorKey.cpp:134
Tensor T() const
Expects input to be <= 2-D Tensor by swapping dimension 0 and 1.
Definition: Tensor.cpp:1079
void To(const core::Tensor &src, core::Tensor &dst, double scale, double offset)
Definition: Image.cpp:17
void SetPointAttr(const std::string &key, const core::Tensor &value)
Definition: PointCloud.h:177
Tensor IndexGet(const std::vector< Tensor > &index_tensors) const
Advanced indexing getter. This will always allocate a new Tensor.
Definition: Tensor.cpp:905
void Touch(const geometry::PointCloud &pcd)
Allocate control grids in the shared camera space.
Definition: ControlGrid.cpp:46
a[190]
Definition: essential_matrix_poly.h:19
int64_t GetCols() const
Get the number of columns of the image.
Definition: Image.h:87
static const std::string kGrid8NbVertexInterpRatios
8 neighbor grid interpolation ratio for vertex per point.
Definition: ControlGrid.h:36
const Dtype Float32
Definition: Dtype.cpp:42
Definition: SizeVector.h:70
#define LogError(...)
Definition: Logging.h:60
std::tuple< core::Tensor, core::Tensor, core::Tensor > GetNeighborGridMap()
Definition: ControlGrid.cpp:115
bool HasPointAttr(const std::string &key) const
Definition: PointCloud.h:207
const TensorMap & GetPointAttr() const
Getter for point_attr_ TensorMap. Used in Pybind.
Definition: PointCloud.h:111
static TensorKey Slice(utility::optional< int64_t > start, utility::optional< int64_t > stop, utility::optional< int64_t > step)
Definition: TensorKey.cpp:138
void Compactify()
Definition: ControlGrid.cpp:82
Image color_
The color image.
Definition: RGBDImage.h:104
core::Tensor & GetPointPositions()
Get the value of the "positions" attribute. Convenience function.
Definition: PointCloud.h:124
geometry::PointCloud Deform(const geometry::PointCloud &pcd)
Non-rigidly deform a point cloud using the control grid.
Definition: ControlGrid.cpp:241
static PointCloud CreateFromRGBDImage(const RGBDImage &rgbd_image, const core::Tensor &intrinsics, const core::Tensor &extrinsics=core::Tensor::Eye(4, core::Float32, core::Device("CPU:0")), float depth_scale=1000.0f, float depth_max=3.0f, int stride=1, bool with_normals=false)
Factory function to create a point cloud from an RGB-D image and a camera model.
Definition: PointCloud.cpp:986
std::vector< Eigen::Vector3i > TensorToEigenVector3iVector(const core::Tensor &tensor)
Converts a tensor of shape (N, 3) to std::vector<Eigen::Vector3i>. An exception will be thrown if the...
Definition: EigenConverter.cpp:155
void SetPointNormals(const core::Tensor &value)
Set the value of the "normals" attribute. Convenience function.
Definition: PointCloud.h:198
core::Device GetDevice()
Definition: ControlGrid.h:115
const Dtype Int64
Definition: Dtype.cpp:47
Tensor To(Dtype dtype, bool copy=false) const
Definition: Tensor.cpp:739
RGBDImage A pair of color and depth images.
Definition: RGBDImage.h:21
int64_t GetAnchorIdx()
Definition: ControlGrid.h:116
void SetPointColors(const core::Tensor &value)
Set the value of the "colors" attribute. Convenience function.
Definition: PointCloud.h:192
Tensor Floor() const
Element-wise floor value of a tensor, returning a new tensor.
Definition: Tensor.cpp:1411