mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 01:20:25 +08:00
DatabaseViewer: using DBDriver directly instead of Memory to save RAM on large databases
This commit is contained in:
@@ -60,6 +60,9 @@ class VisualWord;
|
||||
//
|
||||
class RTABMAP_EXP DBDriver : public UThreadNode
|
||||
{
|
||||
public:
|
||||
static DBDriver * create(const ParametersMap & parameters = ParametersMap());
|
||||
|
||||
public:
|
||||
virtual ~DBDriver();
|
||||
|
||||
@@ -75,6 +78,15 @@ public:
|
||||
double getEmptyTrashesTime() const {return _emptyTrashesTime;}
|
||||
void setTimestampUpdateEnabled(bool enabled) {_timestampUpdate = enabled;} // used on Update Signature and Word queries
|
||||
|
||||
// Warning: the following functions don't look in the trash, direct database modifications
|
||||
void generateGraph(
|
||||
const std::string & fileName,
|
||||
const std::set<int> & ids = std::set<int>(),
|
||||
const std::map<int, Signature *> & otherSignatures = std::map<int, Signature *>());
|
||||
void addLink(const Link & link);
|
||||
void removeLink(int from, int to);
|
||||
void updateLink(const Link & link);
|
||||
|
||||
public:
|
||||
void addStatisticsAfterRun(int stMemSize, int lastSignAdded, int processMemUsed, int databaseMemUsed, int dictionarySize) const;
|
||||
|
||||
@@ -128,6 +140,8 @@ private:
|
||||
virtual void updateQuery(const std::list<Signature *> & signatures, bool updateTimestamp) const = 0;
|
||||
virtual void updateQuery(const std::list<VisualWord *> & words, bool updateTimestamp) const = 0;
|
||||
|
||||
virtual void addLinkQuery(const Link & link) const = 0;
|
||||
virtual void updateLinkQuery(const Link & link) const = 0;
|
||||
|
||||
// Load objects
|
||||
virtual void loadQuery(VWDictionary * dictionary) const = 0;
|
||||
|
||||
@@ -48,7 +48,6 @@ namespace rtabmap {
|
||||
|
||||
class Signature;
|
||||
class DBDriver;
|
||||
class GraphNode;
|
||||
class VWDictionary;
|
||||
class VisualWord;
|
||||
class Feature2D;
|
||||
@@ -164,10 +163,7 @@ public:
|
||||
virtual void dumpSignatures(const char * fileNameSign, bool words3D) const;
|
||||
void dumpDictionary(const char * fileNameRef, const char * fileNameDesc) const;
|
||||
|
||||
void generateGraph(const std::string & fileName, std::set<int> ids = std::set<int>());
|
||||
void createGraph(GraphNode * parent,
|
||||
unsigned int maxDepth,
|
||||
const std::set<int> & endIds = std::set<int>());
|
||||
void generateGraph(const std::string & fileName, const std::set<int> & ids = std::set<int>());
|
||||
|
||||
//keypoint stuff
|
||||
const VWDictionary * getVWDictionary() const;
|
||||
|
||||
Reference in New Issue
Block a user