mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 01:20:25 +08:00
added EpipolarGeometry::triangulatePoints() (LS and iterative LS)
Added option to see words3d in constraint view git-svn-id: http://rtabmap.googlecode.com/svn/trunk/rtabmap@1974 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
@@ -31,6 +31,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include "rtabmap/core/Parameters.h"
|
||||
#include <opencv2/core/core.hpp>
|
||||
#include <opencv2/features2d/features2d.hpp>
|
||||
#include <pcl/point_cloud.h>
|
||||
#include <pcl/point_types.h>
|
||||
#include <list>
|
||||
#include <vector>
|
||||
|
||||
@@ -111,6 +113,26 @@ public:
|
||||
const std::multimap<int, cv::KeyPoint> & wordsB,
|
||||
std::list<std::pair<int, std::pair<cv::KeyPoint, cv::KeyPoint> > > & pairs);
|
||||
|
||||
static cv::Mat linearLSTriangulation(
|
||||
cv::Point3d u, //homogenous image point (u,v,1)
|
||||
cv::Matx34d P, //camera 1 matrix 3x4 double
|
||||
cv::Point3d u1, //homogenous image point in 2nd camera
|
||||
cv::Matx34d P1); //camera 2 matrix 3x4 double
|
||||
|
||||
static cv::Mat iterativeLinearLSTriangulation(
|
||||
cv::Point3d u, //homogenous image point (u,v,1)
|
||||
const cv::Matx34d & P, //camera 1 matrix 3x4 double
|
||||
cv::Point3d u1, //homogenous image point in 2nd camera
|
||||
const cv::Matx34d & P1); //camera 2 matrix 3x4 double
|
||||
|
||||
static double triangulatePoints(
|
||||
const std::vector<cv::Point2f>& pt_set1,
|
||||
const std::vector<cv::Point2f>& pt_set2,
|
||||
const cv::Mat& P, // 3x4 double
|
||||
const cv::Mat& P1, // 3x4 double
|
||||
pcl::PointCloud<pcl::PointXYZ>::Ptr & pointcloud,
|
||||
std::vector<double> & reproj_errors);
|
||||
|
||||
private:
|
||||
int _matchCountMinAccepted;
|
||||
double _ransacParam1;
|
||||
|
||||
Reference in New Issue
Block a user