mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-01 17:10:26 +08:00
Added image sequence to rtabmap::Image class
git-svn-id: http://rtabmap.googlecode.com/svn/trunk/rtabmap@740 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
@@ -59,7 +59,7 @@ public:
|
||||
CameraEvent(const cv::Mat & descriptors, const std::vector<cv::KeyPoint> & keypoints, const cv::Mat & image = cv::Mat(), int cameraId = 0) :
|
||||
UEvent(kCodeFeatures),
|
||||
_cameraId(cameraId),
|
||||
_image(image, descriptors, keypoints)
|
||||
_image(image, 0, descriptors, keypoints)
|
||||
{
|
||||
}
|
||||
CameraEvent(int cameraId = 0) :
|
||||
|
||||
@@ -16,13 +16,18 @@
|
||||
namespace rtabmap
|
||||
{
|
||||
|
||||
/**
|
||||
* An id is automatically generated if id=0.
|
||||
*/
|
||||
class Image
|
||||
{
|
||||
public:
|
||||
Image(const cv::Mat & image = cv::Mat(),
|
||||
int id = 0,
|
||||
const cv::Mat & descriptors = cv::Mat(),
|
||||
const std::vector<cv::KeyPoint> & keypoints = std::vector<cv::KeyPoint>()) :
|
||||
_image(image),
|
||||
_id(id),
|
||||
_descriptors(descriptors),
|
||||
_keypoints(keypoints)
|
||||
{
|
||||
@@ -30,11 +35,13 @@ public:
|
||||
|
||||
bool empty() const {return _image.empty() && _descriptors.empty() && _keypoints.size() == 0;}
|
||||
const cv::Mat & image() const {return _image;}
|
||||
int id() const {return _id;};
|
||||
const cv::Mat & descriptors() const {return _descriptors;}
|
||||
const std::vector<cv::KeyPoint> & keypoints() const {return _keypoints;}
|
||||
|
||||
private:
|
||||
cv::Mat _image;
|
||||
int _id;
|
||||
cv::Mat _descriptors;
|
||||
std::vector<cv::KeyPoint> _keypoints;
|
||||
};
|
||||
|
||||
@@ -142,7 +142,7 @@ protected:
|
||||
|
||||
private:
|
||||
void copyData(const Signature * from, Signature * to);
|
||||
Signature * createSignature(int id,
|
||||
Signature * createSignature(
|
||||
const Image & image,
|
||||
bool keepRawData=false);
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ public:
|
||||
Rtabmap();
|
||||
virtual ~Rtabmap();
|
||||
|
||||
void process(const cv::Mat & image); // for convenience
|
||||
void process(const cv::Mat & image, int id=0); // for convenience, an id is automatically generated if id=0
|
||||
void process(const Image & image); // for convenience
|
||||
|
||||
void init(const ParametersMap & param, bool deleteMemory = true);
|
||||
@@ -94,6 +94,7 @@ public:
|
||||
std::map<int, int> getWeights();
|
||||
int getTotalMemSize();
|
||||
double getLastProcessTime() const {return _lastProcessTime;};
|
||||
std::multimap<int, cv::KeyPoint> getWords(int nodeId);
|
||||
|
||||
void setTimeThreshold(float maxTimeAllowed); // in ms
|
||||
|
||||
|
||||
Reference in New Issue
Block a user