-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathmain.cpp
More file actions
26 lines (18 loc) · 670 Bytes
/
main.cpp
File metadata and controls
26 lines (18 loc) · 670 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
//
// Developer : Prakriti Chintalapoodi - c.prakriti@gmail.com
//
#include "bowfeatures.h"
#include "classification.h"
#define TRAINING_DATA_DIR "train/" //location of the training data
#define TEST_DATA_DIR "test/" //location of the testing data
#define DICTIONARY_SIZE 1000
int main()
{
BOWfeatures feat_obj(path(TRAINING_DATA_DIR), path(TEST_DATA_DIR), DICTIONARY_SIZE);
classification classify_obj;
// Find the BoW features of the training and test images
feat_obj.findBoWFeatures();
Mat responses;
classify_obj.useSVM(feat_obj.getTrainData(), feat_obj.getTrainLabels(), feat_obj.getTestData(), responses);
return 0;
}