39 #ifndef _vpHomogeneousMatrix_h_
40 #define _vpHomogeneousMatrix_h_
54 #include <visp3/core/vpArray2D.h>
55 #include <visp3/core/vpRotationMatrix.h>
56 #include <visp3/core/vpThetaUVector.h>
58 #include <visp3/core/vpPoseVector.h>
60 #ifdef VISP_HAVE_NLOHMANN_JSON
61 #include <nlohmann/json.hpp>
210 #if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
218 void buildFrom(
const std::vector<float> &v);
219 void buildFrom(
const std::vector<double> &v);
220 void buildFrom(
double tx,
double ty,
double tz,
double tux,
double tuy,
double tuz);
222 void convert(std::vector<float> &M);
223 void convert(std::vector<double> &M);
239 bool isAnHomogeneousMatrix(
double threshold = 1e-6)
const;
240 bool isValid()
const;
269 void load(std::ifstream &f);
287 void load(
const std::string &filename);
310 void save(std::ofstream &f)
const;
332 void save(
const std::string &filename)
const;
348 void orthogonalizeRotation();
357 void resize(
unsigned int nrows,
unsigned int ncols,
bool flagNullify =
true)
365 static vpHomogeneousMatrix compute3d3dTransformation(
const std::vector<vpPoint> &p,
const std::vector<vpPoint> &q);
369 #ifdef VISP_HAVE_NLOHMANN_JSON
376 void parse_json(
const nlohmann::json &j);
377 void convert_to_json(nlohmann::json &j)
const;
382 #if defined(VISP_BUILD_DEPRECATED_FUNCTIONS)
395 vp_deprecated
void setIdentity();
403 #ifdef VISP_HAVE_NLOHMANN_JSON
406 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)
vp_deprecated void init()
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)