Added Load/Save vocabulary actions in File menu (in console mode, see "--vocabulary" option) (issue #2)
This commit is contained in:
@@ -69,6 +69,9 @@ public:
|
||||
bool saveSession(const QString & path);
|
||||
bool isSessionModified() const {return sessionModified_;}
|
||||
|
||||
bool saveVocabulary(const QString & filePath) const;
|
||||
bool loadVocabulary(const QString & filePath);
|
||||
|
||||
int loadObjects(const QString & dirPath, bool recursive = false); // call updateObjects()
|
||||
const ObjSignature * addObject(const QString & filePath);
|
||||
const ObjSignature * addObject(const cv::Mat & image, int id=0, const QString & filePath = QString());
|
||||
|
||||
@@ -87,6 +87,8 @@ private Q_SLOTS:
|
||||
void saveSettings();
|
||||
void loadObjects();
|
||||
bool saveObjects();
|
||||
void loadVocabulary();
|
||||
void saveVocabulary();
|
||||
void addObjectFromScene();
|
||||
void addObjectsFromFiles(const QStringList & fileNames);
|
||||
void addObjectsFromFiles();
|
||||
@@ -104,7 +106,7 @@ private Q_SLOTS:
|
||||
void showHideControls();
|
||||
void showObjectsFeatures();
|
||||
void hideObjectsFeatures();
|
||||
void updateObjects(const QList<int> & ids = QList<int>());
|
||||
void updateObjects();
|
||||
void notifyParametersChanged(const QStringList & param);
|
||||
void moveCameraFrame(int frame);
|
||||
void rectHovered(int objId);
|
||||
@@ -122,6 +124,7 @@ private:
|
||||
void showObject(find_object::ObjWidget * obj);
|
||||
void updateObjectSize(find_object::ObjWidget * obj);
|
||||
void updateVocabulary(const QList<int> & ids = QList<int>());
|
||||
void updateObjects(const QList<int> & ids);
|
||||
|
||||
private:
|
||||
Ui_mainWindow * ui_;
|
||||
|
||||
@@ -81,7 +81,7 @@ public:
|
||||
const std::vector<cv::KeyPoint> keypoints() const {return keypoints_;}
|
||||
const QMap<int,int> & words() const {return words_;}
|
||||
const QPixmap & pixmap() const {return pixmap_;}
|
||||
QColor defaultColor() const;
|
||||
QColor defaultColor(int id) const;
|
||||
bool isImageShown() const;
|
||||
bool isFeaturesShown() const;
|
||||
bool isSizedFeatures() const;
|
||||
|
||||
@@ -267,7 +267,7 @@ class FINDOBJECT_EXP Settings
|
||||
PARAMETER(General, nextObjID, uint, 1, "Next object ID to use.");
|
||||
PARAMETER(General, imageFormats, QString, "*.png *.jpg *.bmp *.tiff *.ppm *.pgm", "Image formats supported.");
|
||||
PARAMETER(General, videoFormats, QString, "*.avi *.m4v *.mp4", "Video formats supported.");
|
||||
PARAMETER(General, mirrorView, bool, true, "Flip the camera image horizontally (like all webcam applications).");
|
||||
PARAMETER(General, mirrorView, bool, false, "Flip the camera image horizontally (like all webcam applications).");
|
||||
PARAMETER(General, invertedSearch, bool, true, "Instead of matching descriptors from the objects to those in a vocabulary created with descriptors extracted from the scene, we create a vocabulary from all the objects' descriptors and we match scene's descriptors to this vocabulary. It is the inverted search mode.");
|
||||
PARAMETER(General, controlsShown, bool, false, "Show play/image seek controls (useful with video file and directory of images modes).");
|
||||
PARAMETER(General, threads, int, 1, "Number of threads used for objects matching and homography computation. 0 means as many threads as objects. On InvertedSearch mode, multi-threading has only effect on homography computation.");
|
||||
|
||||
Reference in New Issue
Block a user