MCPcopy Create free account
hub / github.com/biometrics/openbr / train

Method train

openbr/plugins/core/loadstore.cpp:213–229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

211 }
212
213 void train(const TemplateList &src)
214 {
215 if (QFileInfo(getFileName()).exists())
216 return;
217
218 qDebug("Training %s", qPrintable(fileName));
219 distance->train(src);
220
221 qDebug("Storing %s", qPrintable(fileName));
222 QFile file(fileName);
223 if (!file.open(QFile::WriteOnly))
224 qFatal("Failed to open %s for writing.", qPrintable(fileName));
225
226 QDataStream stream(&file);
227 stream << distanceString;
228 distance->store(stream);
229 }
230
231 float compare(const Template &a, const Template &b) const
232 {

Callers 1

trainMethod · 0.45

Calls 2

openMethod · 0.45
storeMethod · 0.45

Tested by

no test coverage detected