Commit acace5582e90674d4c97417179da6cc2a2a5e3fb
1 parent
99ea035f
implemented ShowTrainingTransform
Showing
1 changed file
with
24 additions
and
0 deletions
openbr/plugins/gui.cpp
| @@ -510,6 +510,30 @@ BR_REGISTER(Transform, ShowTransform) | @@ -510,6 +510,30 @@ BR_REGISTER(Transform, ShowTransform) | ||
| 510 | 510 | ||
| 511 | /*! | 511 | /*! |
| 512 | * \ingroup transforms | 512 | * \ingroup transforms |
| 513 | + * \brief Show the training data | ||
| 514 | + * \author Josh Klontz \cite jklontz | ||
| 515 | + */ | ||
| 516 | +class ShowTrainingTransform : public Transform | ||
| 517 | +{ | ||
| 518 | + Q_OBJECT | ||
| 519 | + Q_PROPERTY(br::Transform *show READ get_show WRITE set_show RESET reset_show STORED false) | ||
| 520 | + BR_PROPERTY(br::Transform*, show, make("Show")) | ||
| 521 | + | ||
| 522 | + void train(const TemplateList &data) | ||
| 523 | + { | ||
| 524 | + TemplateList dst; | ||
| 525 | + show->project(data, dst); | ||
| 526 | + } | ||
| 527 | + | ||
| 528 | + void project(const Template &src, Template &dst) const | ||
| 529 | + { | ||
| 530 | + dst = src; | ||
| 531 | + } | ||
| 532 | +}; | ||
| 533 | +BR_REGISTER(Transform, ShowTrainingTransform) | ||
| 534 | + | ||
| 535 | +/*! | ||
| 536 | + * \ingroup transforms | ||
| 513 | * \brief Manual selection of landmark locations | 537 | * \brief Manual selection of landmark locations |
| 514 | * \author Scott Klum \cite sklum | 538 | * \author Scott Klum \cite sklum |
| 515 | */ | 539 | */ |