Commit 9dd6e560a8e8d527556234cb8e2c1d90c22b081a
1 parent
fbbcf71f
Load Component Algorithm
Showing
1 changed file
with
4 additions
and
1 deletions
openbr/janus.cpp
| ... | ... | @@ -24,7 +24,10 @@ janus_error janus_initialize(const char *sdk_path, const char *temp_path, const |
| 24 | 24 | if (algorithm.isEmpty()) { |
| 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 | - } else { | |
| 27 | + } else if (algorithm.compare("Component") == 0) { | |
| 28 | + transform = Transform::fromAlgorithm(algorithm); | |
| 29 | + distance = Distance::fromAlgorithm(algorithm); | |
| 30 | + } else { | |
| 28 | 31 | transform.reset(Transform::make(algorithm + "Enroll", NULL)); |
| 29 | 32 | distance.reset(Distance::make(algorithm + "Compare", NULL)); |
| 30 | 33 | } | ... | ... |