Commit a2959d5a5a88f932bc4fd9f0bc39e0b5e9ac9922
1 parent
6046e0b9
Added eigen initializer
Showing
2 changed files
with
19 additions
and
1 deletions
openbr/plugins/distance.cpp
| @@ -221,8 +221,9 @@ private: | @@ -221,8 +221,9 @@ private: | ||
| 221 | if (a.size() != b.size()) qFatal("Comparison size mismatch"); | 221 | if (a.size() != b.size()) qFatal("Comparison size mismatch"); |
| 222 | 222 | ||
| 223 | QList<float> scores; | 223 | QList<float> scores; |
| 224 | - for (int i=0; i<distances.size(); i++) | 224 | + for (int i=0; i<distances.size(); i++) { |
| 225 | scores.append(distances[i]->compare(Template(a.file, a[i]),Template(b.file, b[i]))); | 225 | scores.append(distances[i]->compare(Template(a.file, a[i]),Template(b.file, b[i]))); |
| 226 | + } | ||
| 226 | 227 | ||
| 227 | switch (operation) { | 228 | switch (operation) { |
| 228 | case Mean: | 229 | case Mean: |
openbr/plugins/eigen3.cpp
| @@ -24,6 +24,23 @@ namespace br | @@ -24,6 +24,23 @@ namespace br | ||
| 24 | { | 24 | { |
| 25 | 25 | ||
| 26 | /*! | 26 | /*! |
| 27 | + * \ingroup initializers | ||
| 28 | + * \brief Initialize Stasm | ||
| 29 | + * \author Scott Klum \cite sklum | ||
| 30 | + */ | ||
| 31 | +class EigenInitializer : public Initializer | ||
| 32 | +{ | ||
| 33 | + Q_OBJECT | ||
| 34 | + | ||
| 35 | + void initialize() const | ||
| 36 | + { | ||
| 37 | + Eigen::initParallel(); | ||
| 38 | + } | ||
| 39 | +}; | ||
| 40 | + | ||
| 41 | +BR_REGISTER(Initializer, EigenInitializer) | ||
| 42 | + | ||
| 43 | +/*! | ||
| 27 | * \ingroup transforms | 44 | * \ingroup transforms |
| 28 | * \brief Projects input into learned Principal Component Analysis subspace. | 45 | * \brief Projects input into learned Principal Component Analysis subspace. |
| 29 | * \author Brendan Klare \cite bklare | 46 | * \author Brendan Klare \cite bklare |