Classes | Functions
pe Namespace Reference

Classes

class  CameraSimulator
class  CircleCameraSimulator
struct  HomographyDecomposition
class  HowardDescriptorExtractor
class  HowardStereoMatcher
class  PoseEstimator
 A class that estimates camera pose from features in image frames. More...
class  PoseEstimator2d
class  PoseEstimator3d
class  PoseEstimatorH

Functions

void _filterInliers (const vector< Point3f > &obj_pts, const vector< Point2f > &img_pts, const Mat &R, const Mat &T, const Mat &intrinsics, const Mat &distortion, double reprojectionError, vector< bool > &valid)
void addLinkNoise (std::vector< cv::DMatch > &indices, double ratio=0.05)
void addLinkNoise (vector< int > &indices, double ratio=0.05)
void addLinkNoise (vector< cv::DMatch > &indices, double ratio)
void addPointNoise (vector< Point2f > &points, double sigma=3.0)
void applyRT (const Mat &R, const Mat &T, const vector< Point3f > &points, vector< Point3f > &pointsRT)
double avgSampsonusError (const cv::Mat &essential, const std::vector< cv::Point2f > &points1, const std::vector< cv::Point2f > &points2, double max_error=1.0, bool verbose=false)
double avgSampsonusError (const Mat &essential, const vector< Point2f > &points1, const vector< Point2f > &points2, double max_error, bool verbose)
double calcCamProjCost (sba::SysSBA &sba, int cam)
cv::Mat calcEssentialMatrix (const cv::Mat &intrinsics_inv, const cv::Mat &R, const cv::Mat &T)
Mat calcEssentialMatrix (const Mat &intrinsics_inv, const Mat &R, const Mat &T)
double calcNodeErr (sba::Proj &prj, const sba::Node &nd, const sba::Point &pt)
float calcOptimalPointCloudScale (const vector< Point3f > &points1, const vector< Point3f > &points2)
void calcRelativeRT (const cv::Mat &R1, const cv::Mat &T1, const cv::Mat &R2, const cv::Mat &T2, cv::Mat &dR, cv::Mat &dT)
void calcRelativeRT (const Mat &R1, const Mat &T1, const Mat &R2, const Mat &T2, Mat &dR, Mat &dT)
float calcScaledPointCloudDistance (const std::vector< cv::Point3f > &points1, const std::vector< cv::Point3f > &points2)
float calcScaledPointCloudDistance (const vector< Point3f > &points1, const vector< Point3f > &points2)
void calcVisible (const cv::Mat &intrinsics, const cv::Mat &R, const cv::Mat &T, const std::vector< cv::Point3f > &objectPoints, const std::vector< cv::Point2f > &imagePoints, std::vector< bool > &visible)
void calcVisible (const Mat &intrinsics, const Mat &R, const Mat &T, const vector< Point3f > &objectPoints, const vector< cv::KeyPoint > &imagePoints, vector< int > &visible)
void computeEpipolarInliers (const cv::Mat &essential, const std::vector< cv::Point2f > &points1, const std::vector< cv::Point2f > &points2, std::vector< bool > &inliers, double maxError=3.0)
void computeEpipolarInliers (const Mat &essential, const vector< Point2f > &points1, const vector< Point2f > &points2, vector< bool > &inliers, double maxError)
 Computes epipolar inliers.
void computeHomographyInliers (const vector< Point2f > &src1, const vector< Point2f > &src2, const Mat &H, vector< Point2f > &inliers1, vector< Point2f > &inliers2, float maxProjError=2.0f)
cv::Point3f crossProduct (cv::Point3f &p1, cv::Point3f &p2)
void drawMatches (const Mat &img, const vector< KeyPoint > &kpts1, const vector< KeyPoint > &kpts2, const vector< cv::DMatch > &matches, Mat &display)
void dumpDecomposition (const HomographyDecomposition &d)
void dumpDecompositions (const vector< HomographyDecomposition > &decompositions)
void dumpFltMat (const char *name, const cv::Mat &mat)
void dumpFltMat (const char *name, const Mat &mat)
void extractPnPData (const fc::Frame &frame1, const fc::Frame &frame2, const std::vector< cv::DMatch > &matches, vector< cv::Point2f > &imagePoints, vector< cv::Point3f > &objectPoints)
double filterDecompositionsEpipolar (const Mat &intrinsics, const Mat &intrinsics_inv, vector< HomographyDecomposition > &decompositions, const vector< Point2f > &points1, const vector< Point2f > &points2)
void filterDecompositionsVisibility (vector< HomographyDecomposition > &decompositions, const Mat &H, const vector< Point2f > &inliers1, const vector< Point2f > &inliers2)
double filterDecompositionsZ (vector< HomographyDecomposition > &decompositions, const vector< Point2f > &points1, const vector< Point2f > &points2, const Mat &intrinsics, const Mat &intrinsics_inv)
void filterInliers (const std::vector< cv::Point3f > &obj_pts, const std::vector< cv::Point2f > &img1_pts, const std::vector< cv::Point2f > &img2_pts, const cv::Mat &R, const cv::Mat &T, const cv::Mat &intrinsics, double reprojectionError, std::vector< bool > &valid)
void filterInliers (const vector< Point3f > &obj_pts, const vector< Point2f > &img1_pts, const vector< Point2f > &img2_pts, const Mat &R, const Mat &T, const Mat &intrinsics, double reprojectionError, vector< bool > &valid)
void filterMatchesByDistance (std::vector< cv::DMatch > &matches, float percentile=0.1f)
void filterMatchesOpticalFlow (const fc::Frame &frame1, const fc::Frame &frame2, std::vector< cv::DMatch > &matches)
template<class T >
void filterVector (const std::vector< T > &src, const std::vector< bool > &valid, std::vector< T > &dst)
template<class T >
void filterVector (const std::vector< T > &src, const std::vector< int > &valid, std::vector< T > &dst)
template<class T >
void filterVector (std::vector< T > &v, const std::vector< bool > &valid)
void findNaNPoints (const std::vector< cv::Point3f > &points, std::vector< bool > &valid)
void findNaNPoints (const vector< Point3f > &points, vector< bool > &valid)
void findRayIntersection (Point3f k1, Point3f b1, Point3f k2, Point3f b2, Point3f &p)
void generate3DPointCloud (std::vector< cv::Point3f > &points, cv::Point3f pmin=cv::Point3f(-1,-1, 5), cv::Point3f pmax=cv::Point3f(1, 1, 10))
void generate3DPointCloud (vector< Point3f > &points, Point3f pmin, Point3f pmax)
void generateCube (std::vector< cv::Point3f > &cloud)
void generateData (cv::Mat &intrinsics, cv::Mat &R, cv::Mat &T, std::vector< cv::KeyPoint > &points1, std::vector< cv::KeyPoint > &points2, std::vector< int > &indices, std::vector< cv::Point3f > &points)
void generateData (Mat &intrinsics, Mat &R, Mat &T, vector< KeyPoint > &points1, vector< KeyPoint > &points2, vector< int > &indices, vector< Point3f > &points)
void generateIntrinsics (Mat &intrinsics)
void generatePlanarObject (vector< Point3f > &points, Point3f N, float d)
void generatePlanarObject (std::vector< cv::Point3f > &points, cv::Point3f N=cv::Point3f(0.0f, 0.0f, 1.0f), float d=10.0f)
void generatePlanarObject (vector< Point3f > &points, Point3f v1, Point3f v2, Vec2f limits1, Vec2f limits2, Point3f t)
void generateProjections (const cv::Mat &intrinsics, const cv::Mat &rvec, const cv::Mat &tvec, const std::vector< cv::Point3f > &cloud, std::vector< cv::KeyPoint > &keypoints)
void generateProjections (const Mat &intrinsics, const Mat &rvec, const Mat &tvec, const vector< Point3f > &cloud, vector< KeyPoint > &keypoints)
void generateRing (std::vector< cv::Point3f > &cloud, cv::Point3f center=cv::Point3f(0, 0, 0))
bool homographyDecompose (const Mat &intrinsics, const Mat &_H, vector< HomographyDecomposition > &hd)
Mat homographyFromDecomposition (const HomographyDecomposition &decomposition)
void initNode (const Mat &intrinsics, const Mat &rvec, const Mat &tvec, sba::Node &node)
void invert (Mat &rvec, Mat &tvec)
void keyPoints2Point2f (const cv::vector< cv::KeyPoint > &src, std::vector< cv::Point2f > &dst)
void keyPoints2Point2f (const vector< KeyPoint > &src, vector< Point2f > &dst)
void keyPoints2Point2f (const std::vector< cv::KeyPoint > &src, std::vector< cv::Point2f > &dst)
void logDecompositions (std::string filename, const vector< HomographyDecomposition > &decompositions)
void matchesFromIndices (const std::vector< cv::KeyPoint > &_set1, const std::vector< cv::KeyPoint > &_set2, const std::vector< int > &indices, std::vector< cv::Point2f > &points1, std::vector< cv::Point2f > &points2)
void matchesFromIndices (const std::vector< cv::KeyPoint > &src1, const std::vector< cv::KeyPoint > &src2, const std::vector< cv::DMatch > &indices, std::vector< cv::Point2f > &dst1, std::vector< cv::Point2f > &dst2)
void matchesFromIndices (const vector< KeyPoint > &src1, const vector< KeyPoint > &src2, const vector< cv::DMatch > &indices, vector< Point2f > &dst1, vector< Point2f > &dst2)
void matchesFromIndices (const vector< Point2f > &set1, const vector< Point2f > &set2, const vector< int > &indices, vector< Point2f > &points1, vector< Point2f > &points2)
void matchesFromIndices (const vector< KeyPoint > &_set1, const vector< KeyPoint > &_set2, const vector< int > &indices, vector< Point2f > &points1, vector< Point2f > &points2)
cv::Point3f mult (const cv::Mat &M, const cv::Point3f &p)
Point3f mult (const Mat &M, const Point3f &p)
Point3f multh (const Mat &M, const Point2f &p)
bool operator< (const HomographyDecomposition lhs, const HomographyDecomposition rhs)
void planarSFM (const cv::Mat &intrinsics, const std::vector< cv::KeyPoint > &set1, const std::vector< cv::KeyPoint > &set2, const std::vector< int > &indices, cv::Mat &H, cv::Mat &R, cv::Mat &T, double reprojectionError=6.0)
void planarSFM (Mat &intrinsics, const vector< KeyPoint > &set1, const vector< KeyPoint > &set2, const vector< int > &indices, Mat &H, Mat &R, Mat &T, double reprojectionError)
void project3dPoints (const vector< Point3f > &points, const Mat &rvec, const Mat &tvec, vector< Point3f > &modif_points)
Mat randomHomography (const vector< Point2f > &points1, const vector< Point2f > &points2, vector< Point2f > &sample1, vector< Point2f > &sample2)
void reprojectPoint (const Mat &R, const Mat &T, Point3f p1, Point3f p2, Point3f &p)
void reprojectPoints (const cv::Mat &intrinsics, const cv::Mat &R, const cv::Mat &T, const std::vector< cv::Point2f > &p1, const std::vector< cv::Point2f > &p2, std::vector< cv::Point3f > &p, std::vector< bool > &valid)
void reprojectPoints (const Mat &intrinsics, const Mat &R, const Mat &T, const vector< Point2f > &p1, const vector< Point2f > &p2, vector< Point3f > &p, vector< bool > &valid)
void sample (int max_index, int count, std::vector< int > &sample_indices)
void sample (int max_index, int count, vector< int > &sample_indices)
static double SampsonusError (const Mat &essential, Point2f pl, Point2f pr)
void sba (const cv::Mat &intrinsics, cv::Mat &rvec, cv::Mat &tvec, std::vector< cv::Point3f > &points, const std::vector< cv::Point2f > &points1, const std::vector< cv::Point2f > &points2)
void sba (const Mat &intrinsics, Mat &rvec, Mat &tvec, vector< Point3f > &points, const vector< Point2f > &points1, const vector< Point2f > &points2)
void selectDecomposition (vector< HomographyDecomposition > &decompositions, const Mat &H, const vector< Point2f > &points1, const vector< Point2f > &points2, const vector< Point2f > &inliers1, const vector< Point2f > &inliers2, const Mat &intrinsics, const Mat &intrinsics_inv)
double SFM (const cv::Mat &intrinsics, const std::vector< cv::KeyPoint > &set1, const std::vector< cv::KeyPoint > &set2, const std::vector< int > &indices, cv::Mat &R, cv::Mat &T, double reprojectionError=6.0)
double SFM (const cv::Mat &intrinsics, const std::vector< cv::Point2f > &points1, const std::vector< cv::Point2f > &points2, cv::Mat &R, cv::Mat &T, double reprojectionError=6.0)
double SFM (const Mat &intrinsics, const vector< KeyPoint > &set1, const vector< KeyPoint > &set2, const vector< int > &indices, Mat &R, Mat &T, double reprojectionError)
double SFM (const Mat &intrinsics, const vector< Point2f > &points1, const vector< Point2f > &points2, Mat &R, Mat &T, double reprojectionError)
double SFMwithSBA (const cv::Mat &intrinsics, const std::vector< cv::KeyPoint > &points1, const std::vector< cv::KeyPoint > &points2, const std::vector< int > &indices, cv::Mat &rvec, cv::Mat &T, double reprojectionError)
double SFMwithSBA (const cv::Mat &intrinsics, std::vector< cv::Point2f > &points1, std::vector< cv::Point2f > &points2, cv::Mat &rvec, cv::Mat &T, double reprojectionError)
double SFMwithSBA (const Mat &intrinsics, const vector< KeyPoint > &set1, const vector< KeyPoint > &set2, const vector< int > &indices, Mat &rvec, Mat &T, double reprojectionError)
double SFMwithSBA (const Mat &intrinsics, vector< Point2f > &points1, vector< Point2f > &points2, Mat &rvec, Mat &T, double reprojectionError)
void test ()
void testReprojectPoints ()
template<class T >
void vectorSubset (const std::vector< T > &src, const std::vector< int > &indices, std::vector< T > &dst)

Function Documentation

void pe::_filterInliers ( const vector< Point3f > &  obj_pts,
const vector< Point2f > &  img_pts,
const Mat &  R,
const Mat &  T,
const Mat &  intrinsics,
const Mat &  distortion,
double  reprojectionError,
vector< bool > &  valid 
)

Definition at line 680 of file planarSFM.cpp.

void pe::addLinkNoise ( std::vector< cv::DMatch > &  indices,
double  ratio = 0.05 
)
void pe::addLinkNoise ( vector< int > &  indices,
double  ratio = 0.05 
)

Definition at line 99 of file simulated.cpp.

void pe::addLinkNoise ( vector< cv::DMatch > &  indices,
double  ratio 
)

Definition at line 110 of file simulated.cpp.

void pe::addPointNoise ( vector< Point2f > &  points,
double  sigma = 3.0 
)

Definition at line 89 of file simulated.cpp.

void pe::applyRT ( const Mat &  R,
const Mat &  T,
const vector< Point3f > &  points,
vector< Point3f > &  pointsRT 
)

Definition at line 227 of file simulated.cpp.

double pe::avgSampsonusError ( const cv::Mat &  essential,
const std::vector< cv::Point2f > &  points1,
const std::vector< cv::Point2f > &  points2,
double  max_error = 1.0,
bool  verbose = false 
)
double pe::avgSampsonusError ( const Mat &  essential,
const vector< Point2f > &  points1,
const vector< Point2f > &  points2,
double  max_error,
bool  verbose 
)

Definition at line 479 of file planarSFM.cpp.

double pe::calcCamProjCost ( sba::SysSBA sba,
int  cam 
)

Definition at line 1071 of file planarSFM.cpp.

cv::Mat pe::calcEssentialMatrix ( const cv::Mat &  intrinsics_inv,
const cv::Mat &  R,
const cv::Mat &  T 
)
Mat pe::calcEssentialMatrix ( const Mat &  intrinsics_inv,
const Mat &  R,
const Mat &  T 
)

Definition at line 441 of file planarSFM.cpp.

double pe::calcNodeErr ( sba::Proj prj,
const sba::Node nd,
const sba::Point pt 
) [inline]

Definition at line 1056 of file planarSFM.cpp.

float pe::calcOptimalPointCloudScale ( const vector< Point3f > &  points1,
const vector< Point3f > &  points2 
)

Definition at line 1186 of file planarSFM.cpp.

void pe::calcRelativeRT ( const cv::Mat &  R1,
const cv::Mat &  T1,
const cv::Mat &  R2,
const cv::Mat &  T2,
cv::Mat &  dR,
cv::Mat &  dT 
)
void pe::calcRelativeRT ( const Mat &  R1,
const Mat &  T1,
const Mat &  R2,
const Mat &  T2,
Mat &  dR,
Mat &  dT 
)

Definition at line 1236 of file planarSFM.cpp.

float pe::calcScaledPointCloudDistance ( const std::vector< cv::Point3f > &  points1,
const std::vector< cv::Point3f > &  points2 
)
float pe::calcScaledPointCloudDistance ( const vector< Point3f > &  points1,
const vector< Point3f > &  points2 
)

Definition at line 1200 of file planarSFM.cpp.

void pe::calcVisible ( const cv::Mat &  intrinsics,
const cv::Mat &  R,
const cv::Mat &  T,
const std::vector< cv::Point3f > &  objectPoints,
const std::vector< cv::Point2f > &  imagePoints,
std::vector< bool > &  visible 
)
void pe::calcVisible ( const Mat &  intrinsics,
const Mat &  R,
const Mat &  T,
const vector< Point3f > &  objectPoints,
const vector< cv::KeyPoint > &  imagePoints,
vector< int > &  visible 
)

Definition at line 241 of file simulated.cpp.

void pe::computeEpipolarInliers ( const cv::Mat &  essential,
const std::vector< cv::Point2f > &  points1,
const std::vector< cv::Point2f > &  points2,
std::vector< bool > &  inliers,
double  maxError = 3.0 
)
void pe::computeEpipolarInliers ( const Mat &  essential,
const vector< Point2f > &  points1,
const vector< Point2f > &  points2,
vector< bool > &  inliers,
double  maxError 
)

Computes epipolar inliers.

Definition at line 340 of file planarSFM.cpp.

void pe::computeHomographyInliers ( const vector< Point2f > &  src1,
const vector< Point2f > &  src2,
const Mat &  H,
vector< Point2f > &  inliers1,
vector< Point2f > &  inliers2,
float  maxProjError = 2.0f 
)

Computes homography inliers

Parameters:
src1First set of points
src2Second set of points
H3x3 homography matrix
inliers1First set of inliers
inliers2Second set of inliers
maxProjErrorMaximum reprojection error of an inlier

Definition at line 298 of file planarSFM.cpp.

cv::Point3f pe::crossProduct ( cv::Point3f &  p1,
cv::Point3f &  p2 
) [inline]

Definition at line 77 of file planarSFM.h.

void pe::drawMatches ( const Mat &  img,
const vector< KeyPoint > &  kpts1,
const vector< KeyPoint > &  kpts2,
const vector< cv::DMatch > &  matches,
Mat &  display 
)

Definition at line 58 of file pe2d.cpp.

void pe::dumpDecomposition ( const HomographyDecomposition &  d)

Definition at line 96 of file planarSFM.cpp.

void pe::dumpDecompositions ( const vector< HomographyDecomposition > &  decompositions)

Definition at line 103 of file planarSFM.cpp.

void pe::dumpFltMat ( const char *  name,
const cv::Mat &  mat 
)
void pe::dumpFltMat ( const char *  name,
const Mat &  mat 
)

Definition at line 82 of file planarSFM.cpp.

void pe::extractPnPData ( const fc::Frame frame1,
const fc::Frame frame2,
const std::vector< cv::DMatch > &  matches,
vector< cv::Point2f > &  imagePoints,
vector< cv::Point3f > &  objectPoints 
)

Definition at line 71 of file pe2d.cpp.

double pe::filterDecompositionsEpipolar ( const Mat &  intrinsics,
const Mat &  intrinsics_inv,
vector< HomographyDecomposition > &  decompositions,
const vector< Point2f > &  points1,
const vector< Point2f > &  points2 
)

Definition at line 535 of file planarSFM.cpp.

void pe::filterDecompositionsVisibility ( vector< HomographyDecomposition > &  decompositions,
const Mat &  H,
const vector< Point2f > &  inliers1,
const vector< Point2f > &  inliers2 
)

Definition at line 363 of file planarSFM.cpp.

double pe::filterDecompositionsZ ( vector< HomographyDecomposition > &  decompositions,
const vector< Point2f > &  points1,
const vector< Point2f > &  points2,
const Mat &  intrinsics,
const Mat &  intrinsics_inv 
)

Definition at line 500 of file planarSFM.cpp.

void pe::filterInliers ( const std::vector< cv::Point3f > &  obj_pts,
const std::vector< cv::Point2f > &  img1_pts,
const std::vector< cv::Point2f > &  img2_pts,
const cv::Mat &  R,
const cv::Mat &  T,
const cv::Mat &  intrinsics,
double  reprojectionError,
std::vector< bool > &  valid 
)
void pe::filterInliers ( const vector< Point3f > &  obj_pts,
const vector< Point2f > &  img1_pts,
const vector< Point2f > &  img2_pts,
const Mat &  R,
const Mat &  T,
const Mat &  intrinsics,
double  reprojectionError,
vector< bool > &  valid 
)

Definition at line 710 of file planarSFM.cpp.

void pe::filterMatchesByDistance ( std::vector< cv::DMatch > &  matches,
float  percentile = 0.1f 
)

Definition at line 150 of file pe2d.cpp.

void pe::filterMatchesOpticalFlow ( const fc::Frame frame1,
const fc::Frame frame2,
std::vector< cv::DMatch > &  matches 
)

Definition at line 113 of file pe2d.cpp.

template<class T >
void pe::filterVector ( const std::vector< T > &  src,
const std::vector< bool > &  valid,
std::vector< T > &  dst 
)

Definition at line 102 of file planarSFM.h.

template<class T >
void pe::filterVector ( const std::vector< T > &  src,
const std::vector< int > &  valid,
std::vector< T > &  dst 
)

Definition at line 115 of file planarSFM.h.

template<class T >
void pe::filterVector ( std::vector< T > &  v,
const std::vector< bool > &  valid 
)

Definition at line 128 of file planarSFM.h.

void pe::findNaNPoints ( const std::vector< cv::Point3f > &  points,
std::vector< bool > &  valid 
)
void pe::findNaNPoints ( const vector< Point3f > &  points,
vector< bool > &  valid 
)

Definition at line 1220 of file planarSFM.cpp.

void pe::findRayIntersection ( Point3f  k1,
Point3f  b1,
Point3f  k2,
Point3f  b2,
Point3f &  p 
)

Definition at line 976 of file planarSFM.cpp.

void pe::generate3DPointCloud ( std::vector< cv::Point3f > &  points,
cv::Point3f  pmin = cv::Point3f(-1,-1, 5),
cv::Point3f  pmax = cv::Point3f(1, 1, 10) 
)
void pe::generate3DPointCloud ( vector< Point3f > &  points,
Point3f  pmin,
Point3f  pmax 
)

Definition at line 74 of file simulated.cpp.

void pe::generateCube ( std::vector< cv::Point3f > &  cloud)

Definition at line 268 of file simulated.cpp.

void pe::generateData ( cv::Mat &  intrinsics,
cv::Mat &  R,
cv::Mat &  T,
std::vector< cv::KeyPoint > &  points1,
std::vector< cv::KeyPoint > &  points2,
std::vector< int > &  indices,
std::vector< cv::Point3f > &  points 
)
void pe::generateData ( Mat &  intrinsics,
Mat &  R,
Mat &  T,
vector< KeyPoint > &  points1,
vector< KeyPoint > &  points2,
vector< int > &  indices,
vector< Point3f > &  points 
)

Definition at line 130 of file simulated.cpp.

void pe::generateIntrinsics ( Mat &  intrinsics)

Definition at line 121 of file simulated.cpp.

void pe::generatePlanarObject ( vector< Point3f > &  points,
Point3f  N,
float  d 
)

Definition at line 47 of file simulated.cpp.

void pe::generatePlanarObject ( std::vector< cv::Point3f > &  points,
cv::Point3f  N = cv::Point3f(0.0f, 0.0f, 1.0f),
float  d = 10.0f 
)
void pe::generatePlanarObject ( vector< Point3f > &  points,
Point3f  v1,
Point3f  v2,
Vec2f  limits1,
Vec2f  limits2,
Point3f  t 
)

Definition at line 63 of file simulated.cpp.

void pe::generateProjections ( const cv::Mat &  intrinsics,
const cv::Mat &  rvec,
const cv::Mat &  tvec,
const std::vector< cv::Point3f > &  cloud,
std::vector< cv::KeyPoint > &  keypoints 
)
void pe::generateProjections ( const Mat &  intrinsics,
const Mat &  rvec,
const Mat &  tvec,
const vector< Point3f > &  cloud,
vector< KeyPoint > &  keypoints 
)

Definition at line 214 of file simulated.cpp.

void pe::generateRing ( std::vector< cv::Point3f > &  cloud,
cv::Point3f  center = cv::Point3f(0, 0, 0) 
)

Definition at line 287 of file simulated.cpp.

bool pe::homographyDecompose ( const Mat &  intrinsics,
const Mat &  _H,
vector< HomographyDecomposition > &  hd 
)

Calculates 8 possible decompositions of a homography

Parameters:
HHomography matrix
hdOutput decompositions

Definition at line 163 of file planarSFM.cpp.

Mat pe::homographyFromDecomposition ( const HomographyDecomposition &  decomposition)

Definition at line 154 of file planarSFM.cpp.

void pe::initNode ( const Mat &  intrinsics,
const Mat &  rvec,
const Mat &  tvec,
sba::Node node 
)

Definition at line 932 of file planarSFM.cpp.

void pe::invert ( Mat &  rvec,
Mat &  tvec 
)

Definition at line 18 of file peh.cpp.

void pe::keyPoints2Point2f ( const cv::vector< cv::KeyPoint > &  src,
std::vector< cv::Point2f > &  dst 
)
void pe::keyPoints2Point2f ( const vector< KeyPoint > &  src,
vector< Point2f > &  dst 
)

Definition at line 112 of file planarSFM.cpp.

void pe::keyPoints2Point2f ( const std::vector< cv::KeyPoint > &  src,
std::vector< cv::Point2f > &  dst 
)
void pe::logDecompositions ( std::string  filename,
const vector< HomographyDecomposition > &  decompositions 
)

Definition at line 616 of file planarSFM.cpp.

void pe::matchesFromIndices ( const std::vector< cv::KeyPoint > &  _set1,
const std::vector< cv::KeyPoint > &  _set2,
const std::vector< int > &  indices,
std::vector< cv::Point2f > &  points1,
std::vector< cv::Point2f > &  points2 
)
void pe::matchesFromIndices ( const std::vector< cv::KeyPoint > &  src1,
const std::vector< cv::KeyPoint > &  src2,
const std::vector< cv::DMatch > &  indices,
std::vector< cv::Point2f > &  dst1,
std::vector< cv::Point2f > &  dst2 
)
void pe::matchesFromIndices ( const vector< KeyPoint > &  src1,
const vector< KeyPoint > &  src2,
const vector< cv::DMatch > &  indices,
vector< Point2f > &  dst1,
vector< Point2f > &  dst2 
)

Definition at line 121 of file planarSFM.cpp.

void pe::matchesFromIndices ( const vector< Point2f > &  set1,
const vector< Point2f > &  set2,
const vector< int > &  indices,
vector< Point2f > &  points1,
vector< Point2f > &  points2 
)

Definition at line 133 of file planarSFM.cpp.

void pe::matchesFromIndices ( const vector< KeyPoint > &  _set1,
const vector< KeyPoint > &  _set2,
const vector< int > &  indices,
vector< Point2f > &  points1,
vector< Point2f > &  points2 
)

Definition at line 140 of file planarSFM.cpp.

cv::Point3f pe::mult ( const cv::Mat &  M,
const cv::Point3f &  p 
)
Point3f pe::mult ( const Mat &  M,
const Point3f &  p 
)

Definition at line 964 of file planarSFM.cpp.

Point3f pe::multh ( const Mat &  M,
const Point2f &  p 
)

Definition at line 970 of file planarSFM.cpp.

bool pe::operator< ( const HomographyDecomposition  lhs,
const HomographyDecomposition  rhs 
)

Definition at line 626 of file planarSFM.cpp.

void pe::planarSFM ( const cv::Mat &  intrinsics,
const std::vector< cv::KeyPoint > &  set1,
const std::vector< cv::KeyPoint > &  set2,
const std::vector< int > &  indices,
cv::Mat &  H,
cv::Mat &  R,
cv::Mat &  T,
double  reprojectionError = 6.0 
)

Implements the algorithm for structure from motion on planar data from the paper by Faugeras and Lustman "Motion and Structure from Motion in a Piecewise Planar Environment, PRAI(2), 1988, pp. 485-508

Parameters:
intrinsicsIntrinsics matrix
set1First set of keypoints
set2Second set of keypoints
indicesMapping from the first set to the second
HOutput 3x3 homography matrix
ROutput 3x3 rotation matrix
TOutput 3x1 translation matrix
reprojectionErrorReprojection error for homography used to find inliers.
void pe::planarSFM ( Mat &  intrinsics,
const vector< KeyPoint > &  set1,
const vector< KeyPoint > &  set2,
const vector< int > &  indices,
Mat &  H,
Mat &  R,
Mat &  T,
double  reprojectionError 
)

Definition at line 898 of file planarSFM.cpp.

void pe::project3dPoints ( const vector< Point3f > &  points,
const Mat &  rvec,
const Mat &  tvec,
vector< Point3f > &  modif_points 
)

Definition at line 40 of file peh.cpp.

Mat pe::randomHomography ( const vector< Point2f > &  points1,
const vector< Point2f > &  points2,
vector< Point2f > &  sample1,
vector< Point2f > &  sample2 
)

Definition at line 656 of file planarSFM.cpp.

void pe::reprojectPoint ( const Mat &  R,
const Mat &  T,
Point3f  p1,
Point3f  p2,
Point3f &  p 
)

reprojects points to 3d p1 and p2 are uniform coordinates in 2d, identity intrinsics matrix assumed

Definition at line 1010 of file planarSFM.cpp.

void pe::reprojectPoints ( const cv::Mat &  intrinsics,
const cv::Mat &  R,
const cv::Mat &  T,
const std::vector< cv::Point2f > &  p1,
const std::vector< cv::Point2f > &  p2,
std::vector< cv::Point3f > &  p,
std::vector< bool > &  valid 
)
void pe::reprojectPoints ( const Mat &  intrinsics,
const Mat &  R,
const Mat &  T,
const vector< Point2f > &  p1,
const vector< Point2f > &  p2,
vector< Point3f > &  p,
vector< bool > &  valid 
)

Definition at line 1025 of file planarSFM.cpp.

void pe::sample ( int  max_index,
int  count,
std::vector< int > &  sample_indices 
)
void pe::sample ( int  max_index,
int  count,
vector< int > &  sample_indices 
)

Definition at line 632 of file planarSFM.cpp.

static double pe::SampsonusError ( const Mat &  essential,
Point2f  pl,
Point2f  pr 
) [static]

Calculates the epipolar reprojection error pl*E*pr

Parameters:
essentialEssential matrix
plA point from the first image
prA point from the second image

Definition at line 320 of file planarSFM.cpp.

void pe::sba ( const cv::Mat &  intrinsics,
cv::Mat &  rvec,
cv::Mat &  tvec,
std::vector< cv::Point3f > &  points,
const std::vector< cv::Point2f > &  points1,
const std::vector< cv::Point2f > &  points2 
)
void pe::sba ( const Mat &  intrinsics,
Mat &  rvec,
Mat &  tvec,
vector< Point3f > &  points,
const vector< Point2f > &  points1,
const vector< Point2f > &  points2 
)

Definition at line 1098 of file planarSFM.cpp.

void pe::selectDecomposition ( vector< HomographyDecomposition > &  decompositions,
const Mat &  H,
const vector< Point2f > &  points1,
const vector< Point2f > &  points2,
const vector< Point2f > &  inliers1,
const vector< Point2f > &  inliers2,
const Mat &  intrinsics,
const Mat &  intrinsics_inv 
)

Filters out decompositions

Parameters:
decompositionsA set of decompositions of a homography matrix
HHomography patrix
points1First set of points
points2Second set of points
inliers1First set of inliers
inliers2Second set of inliers

Definition at line 606 of file planarSFM.cpp.

double pe::SFM ( const cv::Mat &  intrinsics,
const std::vector< cv::KeyPoint > &  set1,
const std::vector< cv::KeyPoint > &  set2,
const std::vector< int > &  indices,
cv::Mat &  R,
cv::Mat &  T,
double  reprojectionError = 6.0 
)
double pe::SFM ( const cv::Mat &  intrinsics,
const std::vector< cv::Point2f > &  points1,
const std::vector< cv::Point2f > &  points2,
cv::Mat &  R,
cv::Mat &  T,
double  reprojectionError = 6.0 
)
double pe::SFM ( const Mat &  intrinsics,
const vector< KeyPoint > &  set1,
const vector< KeyPoint > &  set2,
const vector< int > &  indices,
Mat &  R,
Mat &  T,
double  reprojectionError 
)

Definition at line 784 of file planarSFM.cpp.

double pe::SFM ( const Mat &  intrinsics,
const vector< Point2f > &  points1,
const vector< Point2f > &  points2,
Mat &  R,
Mat &  T,
double  reprojectionError 
)

Definition at line 793 of file planarSFM.cpp.

double pe::SFMwithSBA ( const cv::Mat &  intrinsics,
const std::vector< cv::KeyPoint > &  points1,
const std::vector< cv::KeyPoint > &  points2,
const std::vector< int > &  indices,
cv::Mat &  rvec,
cv::Mat &  T,
double  reprojectionError 
)
double pe::SFMwithSBA ( const cv::Mat &  intrinsics,
std::vector< cv::Point2f > &  points1,
std::vector< cv::Point2f > &  points2,
cv::Mat &  rvec,
cv::Mat &  T,
double  reprojectionError 
)
double pe::SFMwithSBA ( const Mat &  intrinsics,
const vector< KeyPoint > &  set1,
const vector< KeyPoint > &  set2,
const vector< int > &  indices,
Mat &  rvec,
Mat &  T,
double  reprojectionError 
)

Definition at line 671 of file planarSFM.cpp.

double pe::SFMwithSBA ( const Mat &  intrinsics,
vector< Point2f > &  points1,
vector< Point2f > &  points2,
Mat &  rvec,
Mat &  T,
double  reprojectionError 
)

Definition at line 721 of file planarSFM.cpp.

void pe::test ( )

Definition at line 23 of file simulated.cpp.

Definition at line 189 of file simulated.cpp.

template<class T >
void pe::vectorSubset ( const std::vector< T > &  src,
const std::vector< int > &  indices,
std::vector< T > &  dst 
)

Definition at line 147 of file planarSFM.h.



posest
Author(s): Kurt Konolige
autogenerated on Thu Jan 2 2014 12:12:17