Added wordID in shown keypoint info, improved fixed vocabulary behavior
This commit is contained in:
@@ -80,7 +80,7 @@ public:
|
||||
|
||||
void updateDetectorExtractor();
|
||||
void updateObjects(const QList<int> & ids = QList<int>());
|
||||
void updateVocabulary();
|
||||
void updateVocabulary(const QList<int> & ids = QList<int>());
|
||||
|
||||
const QMap<int, ObjSignature*> & objects() const {return objects_;}
|
||||
const Vocabulary * vocabulary() const {return vocabulary_;}
|
||||
|
||||
@@ -104,7 +104,7 @@ private Q_SLOTS:
|
||||
void showHideControls();
|
||||
void showObjectsFeatures();
|
||||
void hideObjectsFeatures();
|
||||
void updateObjects();
|
||||
void updateObjects(const QList<int> & ids = QList<int>());
|
||||
void notifyParametersChanged(const QStringList & param);
|
||||
void moveCameraFrame(int frame);
|
||||
void rectHovered(int objId);
|
||||
@@ -121,8 +121,7 @@ private:
|
||||
int addObjectFromFile(const QString & filePath);
|
||||
void showObject(find_object::ObjWidget * obj);
|
||||
void updateObjectSize(find_object::ObjWidget * obj);
|
||||
void updateVocabulary();
|
||||
void updateObjects(const QList<int> & ids);
|
||||
void updateVocabulary(const QList<int> & ids = QList<int>());
|
||||
|
||||
private:
|
||||
Ui_mainWindow * ui_;
|
||||
|
||||
@@ -53,14 +53,18 @@ class FINDOBJECT_EXP ObjWidget : public QWidget
|
||||
|
||||
public:
|
||||
ObjWidget(QWidget * parent = 0);
|
||||
ObjWidget(int id, const std::vector<cv::KeyPoint> & keypoints, const QImage & image, QWidget * parent = 0);
|
||||
ObjWidget(int id, const std::vector<cv::KeyPoint> & keypoints, const QMultiMap<int,int> & words, const QImage & image, QWidget * parent = 0);
|
||||
virtual ~ObjWidget();
|
||||
|
||||
void setId(int id);
|
||||
void setData(const std::vector<cv::KeyPoint> & keypoints, const QImage & image, const QRect & rect = QRect());
|
||||
void updateImage(const QImage & image);
|
||||
void updateData(const std::vector<cv::KeyPoint> & keypoints, const QMultiMap<int, int> & words=QMultiMap<int, int>());
|
||||
void updateWords(const QMultiMap<int,int> & words);
|
||||
void setTextLabel(const QString & text);
|
||||
void resetKptsColor();
|
||||
void resetKptsWordID();
|
||||
void setKptColor(int index, const QColor & color);
|
||||
void setKptWordID(int index, int wordId);
|
||||
void setGraphicsViewMode(bool on);
|
||||
void setAutoScale(bool autoScale);
|
||||
void setSizedFeatures(bool on);
|
||||
@@ -75,6 +79,7 @@ public:
|
||||
int id() const {return id_;}
|
||||
const QColor & color() const {return color_;}
|
||||
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;
|
||||
bool isImageShown() const;
|
||||
@@ -110,6 +115,7 @@ private:
|
||||
private:
|
||||
int id_;
|
||||
std::vector<cv::KeyPoint> keypoints_;
|
||||
QMap<int,int> words_; //<keypoint, word>
|
||||
QPixmap pixmap_;
|
||||
QRect rect_;
|
||||
QList<KeypointItem*> keypointItems_;
|
||||
|
||||
@@ -275,7 +275,8 @@ class FINDOBJECT_EXP Settings
|
||||
PARAMETER(General, multiDetectionRadius, int, 30, "Ignore detection of the same object in X pixels radius of the previous detections.");
|
||||
PARAMETER(General, port, int, 0, "Port on objects detected are published. If port=0, a port is chosen automatically.")
|
||||
PARAMETER(General, autoScroll, bool, true, "Auto scroll to detected object in Objects panel.");
|
||||
PARAMETER(General, vocabularyIncremental, bool, false, "The vocabulary is created incrementally. When new objects are added, their descriptors are compared to those already in vocabulary to find if the visual word already exist or not. \"NearestNeighbor/nndrRatio\" is used to compare descriptors.");
|
||||
PARAMETER(General, vocabularyFixed, bool, false, "If the vocabulary is fixed, no new words will be added to it when adding new objects.");
|
||||
PARAMETER(General, vocabularyIncremental, bool, false, "The vocabulary is created incrementally. When new objects are added, their descriptors are compared to those already in vocabulary to find if the visual word already exist or not. \"NearestNeighbor/nndrRatio\" and \"NearestNeighbor/minDistance\" are used to compare descriptors.");
|
||||
PARAMETER(General, vocabularyUpdateMinWords, int, 2000, "When the vocabulary is incremental (see \"General/vocabularyIncremental\"), after X words added to vocabulary, the internal index is updated with new words. This parameter lets avoiding to reconstruct the whole nearest neighbor index after each time descriptors of an object are added to vocabulary. 0 means no incremental update.");
|
||||
PARAMETER(General, sendNoObjDetectedEvents, bool, true, "When there are no objects detected, send an empty object detection event.");
|
||||
PARAMETER(General, autoPauseOnDetection, bool, false, "Auto pause the camera when an object is detected.");
|
||||
|
||||
Reference in New Issue
Block a user