Commit 8fc394cd5013550b4b4a7f01a6faae1f66ce2a21

Authored by bhklein
1 parent 9dd6e560

Update algorithm string, check for template.file.fte in janus_augment.

Showing 1 changed file with 2 additions and 1 deletions
openbr/janus.cpp
... ... @@ -25,7 +25,7 @@ janus_error janus_initialize(const char *sdk_path, const char *temp_path, const
25 25 transform.reset(Transform::make("Cvt(Gray)+Affine(88,88,0.25,0.35)+<FaceRecognitionExtraction>+<FaceRecognitionEmbedding>+<FaceRecognitionQuantization>", NULL));
26 26 distance = Distance::fromAlgorithm("FaceRecognition");
27 27 } else if (algorithm.compare("Component") == 0) {
28   - transform = Transform::fromAlgorithm(algorithm);
  28 + transform.reset(Transform::make("LandmarksAffine+Cvt(Gray)+<ComponentEnroll>", NULL));
29 29 distance = Distance::fromAlgorithm(algorithm);
30 30 } else {
31 31 transform.reset(Transform::make(algorithm + "Enroll", NULL));
... ... @@ -91,6 +91,7 @@ janus_error janus_augment(const janus_image image, const janus_attribute_list at
91 91 }
92 92 Template u;
93 93 transform->project(t, u);
  94 + if (u.file.fte) u.m() = cv::Mat();
94 95 template_->append(u);
95 96 return (u.isEmpty() || !u.first().data) ? JANUS_FAILURE_TO_ENROLL : JANUS_SUCCESS;
96 97 }
... ...