Commit e0aabf8c2d95bf4a58062c86d4a8743619d88ce6
Merge branch 'master' of https://github.com/biometrics/openbr into streamlining
Showing
2 changed files
with
6 additions
and
1 deletions
openbr/openbr_plugin.h
| ... | ... | @@ -856,7 +856,7 @@ struct Factory |
| 856 | 856 | else qFatal("%s registry does not contain object named: %s", qPrintable(baseClassName()), qPrintable(name)); |
| 857 | 857 | } |
| 858 | 858 | T *object = registry->value(name)->_make(); |
| 859 | - object->init(file); | |
| 859 | + static_cast<Object*>(object)->init(file); | |
| 860 | 860 | return object; |
| 861 | 861 | } |
| 862 | 862 | //! [Factory make] | ... | ... |
openbr/plugins/meta.cpp
| ... | ... | @@ -274,6 +274,11 @@ class ContractTransform : public UntrainableMetaTransform |
| 274 | 274 | foreach (const Template & t, src) { |
| 275 | 275 | out.merge(t); |
| 276 | 276 | } |
| 277 | + out.file.clearRects(); | |
| 278 | + foreach (const Template & t, src) { | |
| 279 | + if (!t.file.rects().empty()) | |
| 280 | + out.file.appendRects(t.file.rects()); | |
| 281 | + } | |
| 277 | 282 | dst.clear(); |
| 278 | 283 | dst.append(out); |
| 279 | 284 | } | ... | ... |