Added new features

This commit is contained in:
2017-12-20 16:41:32 +01:00
parent 6c3eeac6fb
commit f1b60e4fcb
12 changed files with 323 additions and 140 deletions
+5 -4
View File
@@ -1,7 +1,7 @@
#include "Training.h"
using namespace cv;
using namespace std;
using namespace cv;
Training::Training()
@@ -32,6 +32,8 @@ void Training::CreateTrainingSet()
break;
}
cout << "Press space to take a picture, fill in a new category (n) or stop (esc)" << endl;
bool takingPhotos = true;
int i = 0;
@@ -78,6 +80,7 @@ void Training::LoadTrainingSet()
read_directory(dir, files);
cout << "Found " << files.size()-2 << " files in " << dir << endl;
cout << "Please wait while they are being processed..." << endl;
random_shuffle(files.begin(), files.end());
@@ -91,7 +94,7 @@ void Training::LoadTrainingSet()
if (!image.data)
continue;
cout << "Loaded " << file << endl;
//cout << "Loaded " << file << endl;
string classname;
class_name(file, classname);
@@ -120,8 +123,6 @@ void Training::LoadTrainingSet()
bpn.Train(ITset, OTset);
cout << "Training complete" << endl;
cin.ignore();
}