DVision::FSolver Class Reference
Computes fundamental matrices.
More...
#include <FSolver.h>
List of all members.
Public Member Functions |
| FSolver () |
| FSolver (int cols, int rows) |
virtual | ~FSolver () |
virtual void | setImageSize (int cols, int rows) |
cv::Mat | findFundamentalMat (const cv::Mat &P1, const cv::Mat &P2, double reprojection_error, int min_points=9, std::vector< uchar > *status=NULL, bool computeF=true, double probability=0.99, int max_its=500) const |
bool | checkFundamentalMat (const cv::Mat &P1, const cv::Mat &P2, double reprojection_error, int min_points=9, double probability=0.99, int max_its=500) const |
Protected Member Functions |
void | normalizePoints (const cv::Mat &P, cv::Mat &Q) const |
cv::Mat | _computeF (const cv::Mat &Qc1, const cv::Mat &Qc2, const std::vector< unsigned int > &i_cols) const |
Protected Attributes |
cv::Mat | m_N |
| Normalization matrix.
|
cv::Mat | m_N_t |
| Traspose of normalization matrix.
|
Detailed Description
Computes fundamental matrices.
Constructor & Destructor Documentation
DVision::FSolver::FSolver |
( |
|
) |
|
Creates the solver without setting the image dimensions
DVision::FSolver::FSolver |
( |
int |
cols, |
|
|
int |
rows | |
|
) |
| | |
Creates the solver and set the image dimensions
- Parameters:
-
| cols | width of images |
| rows | height of images |
virtual DVision::FSolver::~FSolver |
( |
|
) |
[inline, virtual] |
Member Function Documentation
cv::Mat DVision::FSolver::_computeF |
( |
const cv::Mat & |
Qc1, |
|
|
const cv::Mat & |
Qc2, |
|
|
const std::vector< unsigned int > & |
i_cols | |
|
) |
| | const [protected] |
Computes F from correspondences Q1(:,i_cols), Q2(:,i_cols)
- Parameters:
-
| Qc1 | 3xN normalized |
| Qc2 | 3xN normalized |
| i_cols | # >= 9 |
- Returns:
- F12 3x3 or empty
bool DVision::FSolver::checkFundamentalMat |
( |
const cv::Mat & |
P1, |
|
|
const cv::Mat & |
P2, |
|
|
double |
reprojection_error, |
|
|
int |
min_points = 9 , |
|
|
double |
probability = 0.99 , |
|
|
int |
max_its = 500 | |
|
) |
| | const |
Checks if a consistent fundamental 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::FSolver::findFundamentalMat |
( |
const cv::Mat & |
P1, |
|
|
const cv::Mat & |
P2, |
|
|
double |
reprojection_error, |
|
|
int |
min_points = 9 , |
|
|
std::vector< uchar > * |
status = NULL , |
|
|
bool |
computeF = true , |
|
|
double |
probability = 0.99 , |
|
|
int |
max_its = 500 | |
|
) |
| | const |
Finds a fundamental 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 |
| computeF | (default: true) if false, the final F 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:
- F s.t. P1' * F * P2 == 0, or empty
void DVision::FSolver::normalizePoints |
( |
const cv::Mat & |
P, |
|
|
cv::Mat & |
Q | |
|
) |
| | const [protected] |
Normalize points
- Parameters:
-
| P | 2xN, 3xN, Nx2, Nx3, float or double points |
| Q | (out) 3xN (double) homogeneous coordinates of points |
void DVision::FSolver::setImageSize |
( |
int |
cols, |
|
|
int |
rows | |
|
) |
| | [virtual] |
Member Data Documentation
Normalization matrix.
Get inliers in the opencv manner
- Parameters:
-
| Q1 | 3xN homogeneous points |
| Q2 | 3xN homogeneous points |
| F12 | fundamental matrix |
| err | max reprojection error |
| status | (out) 1xN CV_8U vector with 1 in the positions of the inliers |
The documentation for this class was generated from the following files: