Go to the documentation of this file.00001 #include "cluster.h"
00002 #include "tools.h"
00003
00004 using namespace tools;
00005
00006 namespace slam
00007 {
00008 Cluster::Cluster() : id_(-1){}
00009
00010 Cluster::Cluster(int id, int frame_id, tf::Transform camera_pose, vector<cv::KeyPoint> kp_l, vector<cv::KeyPoint> kp_r, cv::Mat orb_desc, cv::Mat sift_desc, vector<cv::Point3f> points) :
00011 id_(id), frame_id_(frame_id), camera_pose_(camera_pose), kp_l_(kp_l), kp_r_(kp_r), orb_desc_(orb_desc), sift_desc_(sift_desc), points_(points){}
00012
00013 vector<cv::Point3f> Cluster::getWorldPoints()
00014 {
00015 vector<cv::Point3f> out;
00016 for (uint i=0; i<points_.size(); i++)
00017 {
00018 cv::Point3f p = Tools::transformPoint(points_[i], camera_pose_);
00019 out.push_back(p);
00020 }
00021
00022 return out;
00023 }
00024 }