Added new features
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user