Open3D (C++ API)  0.18.0+252c867
Namespaces | Functions
EigenConverter.h File Reference

(252c867 (Sun May 5 05:39:34 2024 +0000))

#include <Eigen/Core>
#include <vector>
#include "open3d/core/Device.h"
#include "open3d/core/Dtype.h"
#include "open3d/core/Tensor.h"

Go to the source code of this file.

Namespaces

 open3d
 
 open3d::core
 
 open3d::core::eigen_converter
 

Functions

template<class Derived >
core::Tensor open3d::core::eigen_converter::EigenMatrixToTensor (const Eigen::MatrixBase< Derived > &matrix)
 Converts a eigen matrix of shape (M, N) with alignment A and type T to a tensor. More...
 
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > open3d::core::eigen_converter::TensorToEigenMatrixXd (const core::Tensor &tensor)
 Converts a 2D tensor to Eigen::MatrixXd of same shape. Regardless of the tensor dtype, the output will be converted to double. More...
 
Eigen::Matrix< float, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > open3d::core::eigen_converter::TensorToEigenMatrixXf (const core::Tensor &tensor)
 Converts a 2D tensor to Eigen::MatrixXf of same shape. Regardless of the tensor dtype, the output will be converted to float. More...
 
Eigen::Matrix< int, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > open3d::core::eigen_converter::TensorToEigenMatrixXi (const core::Tensor &tensor)
 Converts a 2D tensor to Eigen::MatrixXi of same shape. Regardless of the tensor dtype, the output will be converted to int. More...
 
std::vector< Eigen::Vector2d > open3d::core::eigen_converter::TensorToEigenVector2dVector (const core::Tensor &tensor)
 Converts a tensor of shape (N, 2) to std::vector<Eigen::Vector2d>. An exception will be thrown if the tensor shape is not (N, 2). Regardless of the tensor dtype, the output will be converted to double. More...
 
std::vector< Eigen::Vector3d > open3d::core::eigen_converter::TensorToEigenVector3dVector (const core::Tensor &tensor)
 Converts a tensor of shape (N, 3) to std::vector<Eigen::Vector3d>. An exception will be thrown if the tensor shape is not (N, 3). Regardless of the tensor dtype, the output will be converted to double. More...
 
std::vector< Eigen::Vector2i > open3d::core::eigen_converter::TensorToEigenVector2iVector (const core::Tensor &tensor)
 Converts a tensor of shape (N, 2) to std::vector<Eigen::Vector2i>. An exception will be thrown if the tensor shape is not (N, 2). Regardless of the tensor dtype, the output will be converted to int. More...
 
std::vector< Eigen::Vector3i > open3d::core::eigen_converter::TensorToEigenVector3iVector (const core::Tensor &tensor)
 Converts a tensor of shape (N, 3) to std::vector<Eigen::Vector3i>. An exception will be thrown if the tensor shape is not (N, 3). Regardless of the tensor dtype, the output will be converted to int. More...
 
core::Tensor open3d::core::eigen_converter::EigenVector3dVectorToTensor (const std::vector< Eigen::Vector3d > &values, core::Dtype dtype, const core::Device &device)
 Converts a vector of Eigen::Vector3d to a (N, 3) tensor. This function also takes care of dtype conversion and device transfer if necessary. More...
 
core::Tensor open3d::core::eigen_converter::EigenVector2dVectorToTensor (const std::vector< Eigen::Vector2d > &values, core::Dtype dtype, const core::Device &device)
 Converts a vector of Eigen::Vector2d to a (N, 2) tensor. This function also takes care of dtype conversion and device transfer if necessary. More...
 
core::Tensor open3d::core::eigen_converter::EigenVector2iVectorToTensor (const std::vector< Eigen::Vector2i > &values, core::Dtype dtype, const core::Device &device)
 Converts a vector of Eigen::Vector2i to a (N, 2) tensor. This function also takes care of dtype conversion and device transfer if necessary. More...
 
core::Tensor open3d::core::eigen_converter::EigenVector3iVectorToTensor (const std::vector< Eigen::Vector3i > &values, core::Dtype dtype, const core::Device &device)
 Converts a vector of Eigen::Vector3i to a (N, 3) tensor. This function also takes care of dtype conversion and device transfer if necessary. More...