35 #include <QtCore/QObject> 36 #include <QtCore/QString> 37 #include <QtCore/QMap> 38 #include <QtCore/QMultiMap> 39 #include <QtCore/QPair> 40 #include <QtCore/QVector> 41 #include <QtGui/QTransform> 42 #include <QtCore/QRect> 43 #include <opencv2/opencv.hpp> 56 static void affineSkew(
float tilt,
58 const cv::Mat & image,
64 FindObject(
bool keepImagesInRAM_ =
true, QObject * parent = 0);
67 bool loadSession(
const QString & path);
68 bool saveSession(
const QString & path);
71 bool saveVocabulary(
const QString & filePath)
const;
72 bool loadVocabulary(
const QString & filePath);
74 int loadObjects(
const QString & dirPath,
bool recursive =
false);
75 const ObjSignature * addObject(
const QString & filePath);
76 const ObjSignature * addObject(
const cv::Mat & image,
int id=0,
const QString & filePath = QString());
78 void removeObject(
int id);
79 void removeAllObjects();
83 void updateDetectorExtractor();
84 void updateObjects(
const QList<int> & ids = QList<int>());
85 void updateVocabulary(
const QList<int> & ids = QList<int>());
87 const QMap<int, ObjSignature*> &
objects()
const {
return objects_;}
91 void addObjectAndUpdate(
const cv::Mat & image,
int id=0,
const QString & filePath = QString());
92 void removeObjectAndUpdate(
int id);
93 void detect(
const cv::Mat & image);
99 void clearVocabulary();
bool isSessionModified() const
QMap< int, cv::Mat > objectsDescriptors_
const QMap< int, ObjSignature * > & objects() const
QMap< int, ObjSignature * > objects_
const Vocabulary * vocabulary() const
QMap< int, int > dataRange_