47 #ifndef vpHomography_hh
48 #define vpHomography_hh
53 #include <visp3/core/vpCameraParameters.h>
54 #include <visp3/core/vpImagePoint.h>
55 #include <visp3/core/vpHomogeneousMatrix.h>
56 #include <visp3/core/vpPlane.h>
57 #include <visp3/core/vpPoint.h>
58 #include <visp3/core/vpImagePoint.h>
59 #include <visp3/core/vpMatrix.h>
182 static const double sing_threshold;
183 static const double threshold_rotation;
184 static const double threshold_displacement;
203 void insert(
const vpPlane &bP) ;
205 static void initRansac(
unsigned int n,
206 double *xb,
double *yb,
207 double *xa,
double *ya,
261 void load(std::ifstream &f) ;
284 void resize(
const unsigned int nrows,
const unsigned int ncols,
285 const bool flagNullify =
true)
293 void save(std::ofstream &f)
const ;
295 static void DLT(
const std::vector<double> &xb,
const std::vector<double> &yb,
296 const std::vector<double> &xa,
const std::vector<double> &ya ,
298 bool normalization=
true);
300 static void HLM(
const std::vector<double> &xb,
const std::vector<double> &yb,
301 const std::vector<double> &xa,
const std::vector<double> &ya,
305 static bool ransac(
const std::vector<double> &xb,
const std::vector<double> &yb,
306 const std::vector<double> &xa,
const std::vector<double> &ya,
308 std::vector<bool> &inliers,
310 unsigned int nbInliersConsensus,
312 bool normalization=
true);
317 static void robust(
const std::vector<double> &xb,
const std::vector<double> &yb,
318 const std::vector<double> &xa,
const std::vector<double> &ya,
320 std::vector<bool> &inlier,
322 double weights_threshold=0.4,
323 unsigned int niter=4,
324 bool normalization=
true);
326 #ifndef DOXYGEN_SHOULD_SKIP_THIS
332 static void computeDisplacement(
const vpHomography &aHb,
338 static void computeDisplacement (
const vpHomography &aHb,
346 std::list<vpRotationMatrix> & vR,
347 std::list<vpTranslationVector> & vT,
348 std::list<vpColVector> & vN) ;
349 static double computeDisplacement(
unsigned int nbpoint,
357 static double computeDisplacement(
unsigned int nbpoint,
367 static double computeRotation(
unsigned int nbpoint,
373 static bool degenerateConfiguration(
vpColVector &x,
unsigned int *ind) ;
374 static bool degenerateConfiguration(
vpColVector &x,
unsigned int *ind,
double threshold_area);
375 static bool degenerateConfiguration(
const std::vector<double> &xb,
const std::vector<double> &yb,
376 const std::vector<double> &xa,
const std::vector<double> &ya);
377 static void HartleyNormalization(
unsigned int n,
378 const double *x,
const double *y,
379 double *xn,
double *yn,
380 double &xg,
double &yg,
382 static void HartleyNormalization(
const std::vector<double> &x,
const std::vector<double> &y,
383 std::vector<double> &xn, std::vector<double> &yn,
384 double &xg,
double &yg,
double &coef);
387 double xg1,
double yg1,
double coef1,
388 double xg2,
double yg2,
double coef2 ) ;
390 #endif // DOXYGEN_SHOULD_SKIP_THIS
392 #if defined(VISP_BUILD_DEPRECATED_FUNCTIONS)
Implementation of a matrix and operations on matrices.
static bool save(const std::string &filename, const vpArray2D< Type > &A, const bool binary=false, const char *header="")
vpArray2D< Type > & operator=(Type x)
Set all the elements of the array to x.
Implementation of an homogeneous matrix and operations on such kind of matrices.
error that can be emited by ViSP classes.
Implementation of a generic 2D array used as vase class of matrices and vectors.
Class that defines what is a point.
Implementation of a rotation matrix and operations on such kind of matrices.
vpColVector operator*(const double &x, const vpColVector &v)
Implementation of an homography and operations on homographies.
static bool load(const std::string &filename, vpArray2D< Type > &A, const bool binary=false, char *header=NULL)
Generic class defining intrinsic camera parameters.
Implementation of column vector and the associated operations.
Implementation of a pose vector and operations on poses.
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
void resize(const unsigned int nrows, const unsigned int ncols, const bool flagNullify=true)
This class defines the container for a plane geometrical structure.
Class that consider the case of a translation vector.
Implementation of a rotation vector as axis-angle minimal representation.