-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathtrain.cpp
More file actions
35 lines (25 loc) · 751 Bytes
/
train.cpp
File metadata and controls
35 lines (25 loc) · 751 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include <opencv2/opencv.hpp>
#include <opencv2/xfeatures2d.hpp>
#include <iostream>
#include <omp.h>
#include <sys/stat.h>
#include <dirent.h>
#include "Vocabulary.h"
#include "Utility.h"
#include "Database.h"
#include "Trainer.h"
#include "RootSiftDetector.h"
#include <memory>
using namespace std;
using namespace cv;
int main(int argc, char *argv[])
{
const string image_200 = "/home/test/images-1";
const string image_6k = "/home/test/images/sync_down_1";
auto detector = make_shared<RootSiftDetector>(5,5,10);
Trainer trainer(64,0,image_200,"/home/test/projects/imageRetrievalService/build","test-200-vl-64",detector);
trainer.createVocabulary();
trainer.createDb();
trainer.save();
return 0;
}