DVision::HSolver Class Reference
Computes fundamental matrices.
More...
#include <HSolver.h>
List of all members.
Public Member Functions |
| HSolver () |
| HSolver (int cols, int rows) |
virtual | ~HSolver () |
virtual void | setImageSize (int cols, int rows) |
cv::Mat | findHomography (const cv::Mat &P1, const cv::Mat &P2, double reprojection_error, int min_points=5, std::vector< uchar > *status=NULL, bool computeH=true, double probability=0.99, int max_its=500) const |
bool | checkHomography (const cv::Mat &P1, const cv::Mat &P2, double reprojection_error, int min_points=5, double probability=0.99, int max_its=500) const |
Protected Member Functions |
cv::Mat | _computeH (const cv::Mat &Qc1, const cv::Mat &Qc2, const std::vector< unsigned int > &i_cols) const |
Detailed Description
Computes fundamental matrices.
Constructor & Destructor Documentation
DVision::HSolver::HSolver |
( |
|
) |
|
Creates the solver without setting the image dimensions
DVision::HSolver::HSolver |
( |
int |
cols, |
|
|
int |
rows | |
|
) |
| | |
Creates the solver and set the image dimensions
- Parameters:
-
| cols | width of images |
| rows | height of images |
virtual DVision::HSolver::~HSolver |
( |
|
) |
[inline, virtual] |
Member Function Documentation
cv::Mat DVision::HSolver::_computeH |
( |
const cv::Mat & |
Qc1, |
|
|
const cv::Mat & |
Qc2, |
|
|
const std::vector< unsigned int > & |
i_cols | |
|
) |
| | const [protected] |
Computes H from correspondences Q1(:,i_cols), Q2(:,i_cols)
- Parameters:
-
| Qc1 | 3xN normalized |
| Qc2 | 3xN normalized |
| i_cols | # >= 4 |
- Returns:
- H12 3x3 or empty
bool DVision::HSolver::checkHomography |
( |
const cv::Mat & |
P1, |
|
|
const cv::Mat & |
P2, |
|
|
double |
reprojection_error, |
|
|
int |
min_points = 5 , |
|
|
double |
probability = 0.99 , |
|
|
int |
max_its = 500 | |
|
) |
| | const |
Checks if a consistent homography matrix can be computed from the given points. It is not computed, though.
- Parameters:
-
| P1 | 2xN, 3xN, Nx2, Nx3, correspondences of image 1 in image coordinates |
| P2 | 2xN, 3xN, Nx2, Nx3, correspondences of image 2 in image coordinates |
| reprojection_error | max reprojection error for getting inliers |
| min_points | min number of required inliers |
| probability | RANSAC success probability |
| max_its | maximum number of RANSAC iterations |
- Returns:
- true iff some fundamental matrix is found
cv::Mat DVision::HSolver::findHomography |
( |
const cv::Mat & |
P1, |
|
|
const cv::Mat & |
P2, |
|
|
double |
reprojection_error, |
|
|
int |
min_points = 5 , |
|
|
std::vector< uchar > * |
status = NULL , |
|
|
bool |
computeH = true , |
|
|
double |
probability = 0.99 , |
|
|
int |
max_its = 500 | |
|
) |
| | const |
Finds an homography matrix from the given correspondences by running RANSAC
- Parameters:
-
| P1 | 2xN, 3xN, Nx2, Nx3, correspondences of image 1 in image coordinates |
| P2 | 2xN, 3xN, Nx2, Nx3, correspondences of image 2 in image coordinates |
| reprojection_error | max reprojection error for getting inliers |
| min_points | min number of required inliers |
| status | (out) vector s.t. status[i] == 1 if i-th point is an inlier, 0 otherwise |
| computeH | (default: true) if false, the final H is not computed and an arbitrary non-empty 3x3 matrix is returned (it saves a svd operation) |
| probability | RANSAC success probability |
| max_its | maximum number of RANSAC iterations |
- Returns:
- H s.t. P1' * H * P2 == 0, or empty
void DVision::HSolver::setImageSize |
( |
int |
cols, |
|
|
int |
rows | |
|
) |
| | [virtual] |
The documentation for this class was generated from the following files: