47 #ifndef vpHomography_hh 48 #define vpHomography_hh 53 #include <visp3/core/vpCameraParameters.h> 54 #include <visp3/core/vpHomogeneousMatrix.h> 55 #include <visp3/core/vpImagePoint.h> 56 #include <visp3/core/vpMatrix.h> 57 #include <visp3/core/vpPlane.h> 58 #include <visp3/core/vpPoint.h> 177 static const double sing_threshold;
178 static const double threshold_rotation;
179 static const double threshold_displacement;
198 void insert(
const vpPlane &bP);
200 static void initRansac(
unsigned int n,
double *xb,
double *yb,
double *xa,
double *ya,
vpColVector &x);
238 vpHomography inverse(
double sv_threshold = 1e-16,
unsigned int *rank=NULL)
const;
243 void load(std::ifstream &f);
266 void resize(
unsigned int nrows,
unsigned int ncols,
bool flagNullify =
true)
274 void save(std::ofstream &f)
const;
276 static void DLT(
const std::vector<double> &xb,
const std::vector<double> &yb,
const std::vector<double> &xa,
277 const std::vector<double> &ya,
vpHomography &aHb,
bool normalization =
true);
279 static void HLM(
const std::vector<double> &xb,
const std::vector<double> &yb,
const std::vector<double> &xa,
280 const std::vector<double> &ya,
bool isplanar,
vpHomography &aHb);
282 static bool ransac(
const std::vector<double> &xb,
const std::vector<double> &yb,
const std::vector<double> &xa,
283 const std::vector<double> &ya,
vpHomography &aHb, std::vector<bool> &inliers,
double &residual,
284 unsigned int nbInliersConsensus,
double threshold,
bool normalization =
true);
289 static void robust(
const std::vector<double> &xb,
const std::vector<double> &yb,
const std::vector<double> &xa,
290 const std::vector<double> &ya,
vpHomography &aHb, std::vector<bool> &inlier,
double &residual,
291 double weights_threshold = 0.4,
unsigned int niter = 4,
bool normalization =
true);
293 #ifndef DOXYGEN_SHOULD_SKIP_THIS 303 static void computeDisplacement(
const vpHomography &H,
double x,
double y,
304 std::list<vpRotationMatrix> &vR, std::list<vpTranslationVector> &vT,
305 std::list<vpColVector> &vN);
315 static bool degenerateConfiguration(
vpColVector &x,
unsigned int *ind);
316 static bool degenerateConfiguration(
vpColVector &x,
unsigned int *ind,
double threshold_area);
317 static bool degenerateConfiguration(
const std::vector<double> &xb,
const std::vector<double> &yb,
318 const std::vector<double> &xa,
const std::vector<double> &ya);
319 static void HartleyNormalization(
unsigned int n,
const double *x,
const double *y,
double *xn,
double *yn,
double &xg,
320 double &yg,
double &coef);
321 static void HartleyNormalization(
const std::vector<double> &x,
const std::vector<double> &y, std::vector<double> &xn,
322 std::vector<double> &yn,
double &xg,
double &yg,
double &coef);
324 double xg2,
double yg2,
double coef2);
326 #endif // DOXYGEN_SHOULD_SKIP_THIS 328 #if defined(VISP_BUILD_DEPRECATED_FUNCTIONS) Implementation of a matrix and operations on matrices.
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.
static bool save(const std::string &filename, const vpArray2D< Type > &A, bool binary=false, const char *header="")
error that can be emited by ViSP classes.
Implementation of a generic 2D array used as base class for matrices and vectors. ...
Class that defines a 3D point in the object frame and allows forward projection of a 3D point in the ...
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.
Generic class defining intrinsic camera parameters.
void resize(unsigned int nrows, unsigned int ncols, bool flagNullify=true)
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 ...
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.
static bool load(const std::string &filename, vpArray2D< Type > &A, bool binary=false, char *header=NULL)