39 #ifndef VP_HOMOGENEOUS_MATRIX_H
40 #define VP_HOMOGENEOUS_MATRIX_H
45 #include <visp3/core/vpConfig.h>
60 #include <visp3/core/vpArray2D.h>
61 #include <visp3/core/vpRotationMatrix.h>
62 #include <visp3/core/vpThetaUVector.h>
63 #include <visp3/core/vpPoseVector.h>
65 #ifdef VISP_HAVE_NLOHMANN_JSON
66 #include VISP_NLOHMANN_JSON(json.hpp)
232 #if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
242 vpHomogeneousMatrix &buildFrom(
const double &tx,
const double &ty,
const double &tz,
const double &tux,
const double &tuy,
const double &tuz);
244 void convert(std::vector<float> &M);
245 void convert(std::vector<double> &M);
261 bool isAnHomogeneousMatrix(
double threshold = 1e-6)
const;
262 bool isValid()
const;
291 void load(std::ifstream &f);
309 void load(
const std::string &filename);
332 void save(std::ofstream &f)
const;
354 void save(
const std::string &filename)
const;
370 void orthogonalizeRotation();
379 void resize(
unsigned int nrows,
unsigned int ncols,
bool flagNullify =
true)
387 static vpHomogeneousMatrix compute3d3dTransformation(
const std::vector<vpPoint> &p,
const std::vector<vpPoint> &q);
391 #ifdef VISP_HAVE_NLOHMANN_JSON
398 void parse_json(
const nlohmann::json &j);
399 void convert_to_json(nlohmann::json &j)
const;
404 #if defined(VISP_BUILD_DEPRECATED_FUNCTIONS)
413 VP_DEPRECATED
void init() { }
417 VP_DEPRECATED
void setIdentity();
425 #ifdef VISP_HAVE_NLOHMANN_JSON
428 T.convert_to_json(j);
Implementation of a generic 2D array used as base class for matrices and vectors.
void insert(const vpArray2D< Type > &A, unsigned int r, unsigned int c)
friend void to_json(nlohmann::json &j, const vpArray2D< T > &array)
friend std::ostream & operator<<(std::ostream &s, const vpArray2D< Type > &A)
static bool load(const std::string &filename, vpArray2D< Type > &A, bool binary=false, char *header=nullptr)
vpArray2D< Type > & operator=(Type x)
Set all the elements of the array to x.
static bool save(const std::string &filename, const vpArray2D< Type > &A, bool binary=false, const char *header="")
friend void from_json(const nlohmann::json &j, vpArray2D< T > &array)
Implementation of column vector and the associated operations.
error that can be emitted by ViSP classes.
Implementation of an homogeneous matrix and operations on such kind of matrices.
static const std::string jsonTypeName
void resize(unsigned int nrows, unsigned int ncols, bool flagNullify=true)
Implementation of a matrix and operations on matrices.
Class that defines a 3D point in the object frame and allows forward projection of a 3D point in the ...
Implementation of a pose vector and operations on poses.
Implementation of a rotation vector as quaternion angle minimal representation.
Implementation of a rotation matrix and operations on such kind of matrices.
Implementation of a rotation vector as axis-angle minimal representation.
Class that consider the case of a translation vector.
vpMatrix operator*(const double &x, const vpMatrix &A)