Open3D (C++ API)
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Namespaces | Data Structures | Typedefs | Enumerations | Functions
open3d::utility Namespace Reference

Namespaces

 filesystem
 
 hash_eigen
 
 hash_tuple
 

Data Structures

class  ConsoleProgressBar
 
class  FPSTimer
 
class  IJsonConvertible
 
class  Logger
 
class  ScopeTimer
 
class  Timer
 

Typedefs

using Matrix4d_allocator = Eigen::aligned_allocator< Eigen::Matrix4d >
 
using Matrix6d_allocator = Eigen::aligned_allocator< Eigen::Matrix6d >
 
using Vector2d_allocator = Eigen::aligned_allocator< Eigen::Vector2d >
 
using Vector4i_allocator = Eigen::aligned_allocator< Eigen::Vector4i >
 
using Vector4d_allocator = Eigen::aligned_allocator< Eigen::Vector4d >
 
using Vector6d_allocator = Eigen::aligned_allocator< Eigen::Vector6d >
 

Enumerations

enum  VerbosityLevel { VerbosityLevel::Error = 0, VerbosityLevel::Warning = 1, VerbosityLevel::Info = 2, VerbosityLevel::Debug = 3 }
 

Functions

std::string GetCurrentTimeStamp ()
 
std::string GetProgramOptionAsString (int argc, char **argv, const std::string &option, const std::string &default_value)
 
int GetProgramOptionAsInt (int argc, char **argv, const std::string &option, const int default_value)
 
double GetProgramOptionAsDouble (int argc, char **argv, const std::string &option, const double default_value)
 
Eigen::VectorXd GetProgramOptionAsEigenVectorXd (int argc, char **argv, const std::string &option, const Eigen::VectorXd default_value)
 
bool ProgramOptionExists (int argc, char **argv, const std::string &option)
 
bool ProgramOptionExistsAny (int argc, char **argv, const std::vector< std::string > &options)
 
void SetVerbosityLevel (VerbosityLevel level)
 
VerbosityLevel GetVerbosityLevel ()
 
template<typename... Args>
void LogError (const char *format, const Args &... args)
 
template<typename... Args>
void LogWarning (const char *format, const Args &... args)
 
template<typename... Args>
void LogInfo (const char *format, const Args &... args)
 
template<typename... Args>
void LogDebug (const char *format, const Args &... args)
 
template<typename... Args>
void LogErrorf (const char *format, const Args &... args)
 
template<typename... Args>
void LogWarningf (const char *format, const Args &... args)
 
template<typename... Args>
void LogInfof (const char *format, const Args &... args)
 
template<typename... Args>
void LogDebugf (const char *format, const Args &... args)
 
std::tuple< bool, Eigen::VectorXd > SolveLinearSystemPSD (const Eigen::MatrixXd &A, const Eigen::VectorXd &b, bool prefer_sparse, bool check_symmetric, bool check_det, bool check_psd)
 Function to solve Ax=b. More...
 
Eigen::Matrix4d TransformVector6dToMatrix4d (const Eigen::Vector6d &input)
 
Eigen::Vector6d TransformMatrix4dToVector6d (const Eigen::Matrix4d &input)
 
std::tuple< bool, Eigen::Matrix4d > SolveJacobianSystemAndObtainExtrinsicMatrix (const Eigen::Matrix6d &JTJ, const Eigen::Vector6d &JTr)
 
std::tuple< bool, std::vector< Eigen::Matrix4d, Matrix4d_allocator > > SolveJacobianSystemAndObtainExtrinsicMatrixArray (const Eigen::MatrixXd &JTJ, const Eigen::VectorXd &JTr)
 
template<typename MatType , typename VecType >
std::tuple< MatType, VecType, double > ComputeJTJandJTr (std::function< void(int, VecType &, double &)> f, int iteration_num, bool verbose)
 
template<typename MatType , typename VecType >
std::tuple< MatType, VecType, double > ComputeJTJandJTr (std::function< void(int, std::vector< VecType, Eigen::aligned_allocator< VecType >> &, std::vector< double > &)> f, int iteration_num, bool verbose)
 
template std::tuple< Eigen::Matrix6d, Eigen::Vector6d, double > ComputeJTJandJTr (std::function< void(int, Eigen::Vector6d &, double &)> f, int iteration_num, bool verbose)
 
template std::tuple< Eigen::Matrix6d, Eigen::Vector6d, double > ComputeJTJandJTr (std::function< void(int, std::vector< Eigen::Vector6d, Vector6d_allocator > &, std::vector< double > &)> f, int iteration_num, bool verbose)
 
Eigen::Matrix3d RotationMatrixX (double radians)
 
Eigen::Matrix3d RotationMatrixY (double radians)
 
Eigen::Matrix3d RotationMatrixZ (double radians)
 
void SplitString (std::vector< std::string > &tokens, const std::string &str, const std::string &delimiters, bool trim_empty_str)
 
std::string & LeftStripString (std::string &str, const std::string &chars)
 
std::string & RightStripString (std::string &str, const std::string &chars)
 
std::string & StripString (std::string &str, const std::string &chars)
 
size_t WordLength (const std::string &doc, size_t start_pos, const std::string &valid_chars)
 
void Sleep (int milliseconds)
 

Typedef Documentation

◆ Matrix4d_allocator

using open3d::utility::Matrix4d_allocator = typedef Eigen::aligned_allocator<Eigen::Matrix4d>

◆ Matrix6d_allocator

using open3d::utility::Matrix6d_allocator = typedef Eigen::aligned_allocator<Eigen::Matrix6d>

◆ Vector2d_allocator

using open3d::utility::Vector2d_allocator = typedef Eigen::aligned_allocator<Eigen::Vector2d>

◆ Vector4d_allocator

using open3d::utility::Vector4d_allocator = typedef Eigen::aligned_allocator<Eigen::Vector4d>

◆ Vector4i_allocator

using open3d::utility::Vector4i_allocator = typedef Eigen::aligned_allocator<Eigen::Vector4i>

◆ Vector6d_allocator

using open3d::utility::Vector6d_allocator = typedef Eigen::aligned_allocator<Eigen::Vector6d>

Enumeration Type Documentation

◆ VerbosityLevel

Enumerator
Error 

LogError throws now a runtime_error with the given error message. This should be used if there is no point in continuing the given algorithm at some point and the error is not returned in another way (e.g., via a bool/int as return value).

Warning 

LogWarning is used if an error occured, but the error is also signaled via a return value (i.e., there is no need to throw an exception). This warning should further be used, if the algorithms encounters a state that does not break its continuation, but the output is likely not to be what the user expected.

Info 

LogInfo is used to inform the user with expected output, e.g, pressed a key in the visualizer prints helping information.

Debug 

LogDebug is used to print debug/additional information on the state of the algorithm.

Function Documentation

◆ ComputeJTJandJTr() [1/4]

template<typename MatType , typename VecType >
std::tuple< MatType, VecType, double > open3d::utility::ComputeJTJandJTr ( std::function< void(int, VecType &, double &)>  f,
int  iteration_num,
bool  verbose = true 
)

Function to compute JTJ and Jtr Input: function pointer f and total number of rows of Jacobian matrix Output: JTJ, JTr, sum of r^2 Note: f takes index of row, and outputs corresponding residual and row vector.

◆ ComputeJTJandJTr() [2/4]

template<typename MatType , typename VecType >
std::tuple< MatType, VecType, double > open3d::utility::ComputeJTJandJTr ( )

Function to compute JTJ and Jtr Input: function pointer f and total number of rows of Jacobian matrix Output: JTJ, JTr, sum of r^2 Note: f takes index of row, and outputs corresponding residual and row vector.

◆ ComputeJTJandJTr() [3/4]

template std::tuple<Eigen::Matrix6d, Eigen::Vector6d, double> open3d::utility::ComputeJTJandJTr ( std::function< void(int, Eigen::Vector6d &, double &)>  f,
int  iteration_num,
bool  verbose 
)

◆ ComputeJTJandJTr() [4/4]

template std::tuple<Eigen::Matrix6d, Eigen::Vector6d, double> open3d::utility::ComputeJTJandJTr ( std::function< void(int, std::vector< Eigen::Vector6d, Vector6d_allocator > &, std::vector< double > &)>  f,
int  iteration_num,
bool  verbose 
)

◆ GetCurrentTimeStamp()

std::string open3d::utility::GetCurrentTimeStamp ( )

◆ GetProgramOptionAsDouble()

double open3d::utility::GetProgramOptionAsDouble ( int  argc,
char **  argv,
const std::string &  option,
const double  default_value 
)

◆ GetProgramOptionAsEigenVectorXd()

Eigen::VectorXd open3d::utility::GetProgramOptionAsEigenVectorXd ( int  argc,
char **  argv,
const std::string &  option,
const Eigen::VectorXd  default_value 
)

◆ GetProgramOptionAsInt()

int open3d::utility::GetProgramOptionAsInt ( int  argc,
char **  argv,
const std::string &  option,
const int  default_value 
)

◆ GetProgramOptionAsString()

std::string open3d::utility::GetProgramOptionAsString ( int  argc,
char **  argv,
const std::string &  option,
const std::string &  default_value 
)

◆ GetVerbosityLevel()

VerbosityLevel open3d::utility::GetVerbosityLevel ( )
inline

◆ LeftStripString()

std::string & open3d::utility::LeftStripString ( std::string &  str,
const std::string &  chars 
)

◆ LogDebug()

template<typename... Args>
void open3d::utility::LogDebug ( const char *  format,
const Args &...  args 
)
inline

◆ LogDebugf()

template<typename... Args>
void open3d::utility::LogDebugf ( const char *  format,
const Args &...  args 
)
inline

◆ LogError()

template<typename... Args>
void open3d::utility::LogError ( const char *  format,
const Args &...  args 
)
inline

◆ LogErrorf()

template<typename... Args>
void open3d::utility::LogErrorf ( const char *  format,
const Args &...  args 
)
inline

◆ LogInfo()

template<typename... Args>
void open3d::utility::LogInfo ( const char *  format,
const Args &...  args 
)
inline

◆ LogInfof()

template<typename... Args>
void open3d::utility::LogInfof ( const char *  format,
const Args &...  args 
)
inline

◆ LogWarning()

template<typename... Args>
void open3d::utility::LogWarning ( const char *  format,
const Args &...  args 
)
inline

◆ LogWarningf()

template<typename... Args>
void open3d::utility::LogWarningf ( const char *  format,
const Args &...  args 
)
inline

◆ ProgramOptionExists()

bool open3d::utility::ProgramOptionExists ( int  argc,
char **  argv,
const std::string &  option 
)

◆ ProgramOptionExistsAny()

bool open3d::utility::ProgramOptionExistsAny ( int  argc,
char **  argv,
const std::vector< std::string > &  options 
)

◆ RightStripString()

std::string & open3d::utility::RightStripString ( std::string &  str,
const std::string &  chars 
)

◆ RotationMatrixX()

Eigen::Matrix3d open3d::utility::RotationMatrixX ( double  radians)

◆ RotationMatrixY()

Eigen::Matrix3d open3d::utility::RotationMatrixY ( double  radians)

◆ RotationMatrixZ()

Eigen::Matrix3d open3d::utility::RotationMatrixZ ( double  radians)

◆ SetVerbosityLevel()

void open3d::utility::SetVerbosityLevel ( VerbosityLevel  level)
inline

◆ Sleep()

void open3d::utility::Sleep ( int  milliseconds)

◆ SolveJacobianSystemAndObtainExtrinsicMatrix()

std::tuple< bool, Eigen::Matrix4d > open3d::utility::SolveJacobianSystemAndObtainExtrinsicMatrix ( const Eigen::Matrix6d JTJ,
const Eigen::Vector6d JTr 
)

Function to solve Jacobian system Input: 6x6 Jacobian matrix and 6-dim residual vector. Output: tuple of is_success, 4x4 extrinsic matrices.

◆ SolveJacobianSystemAndObtainExtrinsicMatrixArray()

std::tuple< bool, std::vector< Eigen::Matrix4d, Matrix4d_allocator > > open3d::utility::SolveJacobianSystemAndObtainExtrinsicMatrixArray ( const Eigen::MatrixXd &  JTJ,
const Eigen::VectorXd &  JTr 
)

Function to solve Jacobian system Input: 6nx6n Jacobian matrix and 6n-dim residual vector. Output: tuple of is_success, n 4x4 motion matrices.

◆ SolveLinearSystemPSD()

std::tuple< bool, Eigen::VectorXd > open3d::utility::SolveLinearSystemPSD ( const Eigen::MatrixXd &  A,
const Eigen::VectorXd &  b,
bool  prefer_sparse,
bool  check_symmetric,
bool  check_det,
bool  check_psd 
)

Function to solve Ax=b.

◆ SplitString()

void open3d::utility::SplitString ( std::vector< std::string > &  tokens,
const std::string &  str,
const std::string &  delimiters = " ",
bool  trim_empty_str = true 
)

Function to split a string, mimics boost::split http://stackoverflow.com/questions/236129/split-a-string-in-c

◆ StripString()

std::string & open3d::utility::StripString ( std::string &  str,
const std::string &  chars = "\\\\\ " 
)

Strip empty charactors in front and after string. Similar to Python's str.strip()

◆ TransformMatrix4dToVector6d()

Eigen::Vector6d open3d::utility::TransformMatrix4dToVector6d ( const Eigen::Matrix4d &  input)

Function to transform 4D motion matrix to 6D motion vector this is consistent with the matlab function in the Aerospace Toolbox Reference: https://github.com/qianyizh/ElasticReconstruction/blob/master/Matlab_Toolbox/Core/mrEvaluateRegistration.m

◆ TransformVector6dToMatrix4d()

Eigen::Matrix4d open3d::utility::TransformVector6dToMatrix4d ( const Eigen::Vector6d input)

Function to transform 6D motion vector to 4D motion matrix Reference: https://eigen.tuxfamily.org/dox/group__TutorialGeometry.html#TutorialGeoTransform

◆ WordLength()

size_t open3d::utility::WordLength ( const std::string &  doc,
size_t  start_pos,
const std::string &  valid_chars = "_" 
)

String util: find length of current word staring from a position By default, alpha numeric chars and chars in valid_chars are considered as valid charactors in a word