/* * FindObject.h * * Created on: 2014-07-30 * Author: mathieu */ #ifndef FINDOBJECT_H_ #define FINDOBJECT_H_ #include "find_object/FindObjectExp.h" // DLL export/import defines #include "find_object/DetectionInfo.h" #include #include #include #include #include #include #include #include #include #include class ObjSignature; class Vocabulary; class KeypointDetector; class DescriptorExtractor; class FINDOBJECT_EXP FindObject : public QObject { Q_OBJECT; public: FindObject(QObject * parent = 0); virtual ~FindObject(); int loadObjects(const QString & dirPath); // call updateObjects() const ObjSignature * addObject(const QString & filePath); const ObjSignature * addObject(const cv::Mat & image, int id=0, const QString & filename = QString()); bool addObject(ObjSignature * obj); // take ownership when true is returned void removeObject(int id); void removeAllObjects(); bool detect(const cv::Mat & image, DetectionInfo & info); void updateDetectorExtractor(); void updateObjects(); void updateVocabulary(); const QMap & objects() const {return objects_;} const Vocabulary * vocabulary() const {return vocabulary_;} public Q_SLOTS: void detect(const cv::Mat & image); // emit objectsFound() Q_SIGNALS: void objectsFound(const DetectionInfo &); private: void clearVocabulary(); private: QMap objects_; Vocabulary * vocabulary_; QMap objectsDescriptors_; QMap dataRange_; // KeypointDetector * detector_; DescriptorExtractor * extractor_; }; #endif /* FINDOBJECT_H_ */