Commit c8ab003586006bd6a35a3c4c2e0e60f8fce4cda7
1 parent
e035e21e
Surface the FaceVACS face detector's interoccular distance parameters
Showing
1 changed file
with
9 additions
and
2 deletions
sdk/plugins/ct8.cpp
| ... | ... | @@ -270,7 +270,12 @@ protected: |
| 270 | 270 | struct CT8Detect : public UntrainableTransform |
| 271 | 271 | , public CT8Context |
| 272 | 272 | { |
| 273 | +public: | |
| 273 | 274 | Q_OBJECT |
| 275 | + | |
| 276 | + Q_PROPERTY(float minRelEyeDistance READ get_minRelEyeDistance WRITE set_minRelEyeDistance RESET reset_minRelEyeDistance STORED false) | |
| 277 | + Q_PROPERTY(float maxRelEyeDistance READ get_maxRelEyeDistance WRITE set_maxRelEyeDistance RESET reset_maxRelEyeDistance STORED false) | |
| 278 | + | |
| 274 | 279 | // Perform face, then eye detection using the facevacs SDK |
| 275 | 280 | void project(const Template &src, Template &dst) const |
| 276 | 281 | { |
| ... | ... | @@ -279,8 +284,7 @@ struct CT8Detect : public UntrainableTransform |
| 279 | 284 | FRsdk::CountedPtr<FRsdk::ImageBody> i(new FRsdk::OpenCVImageBody(src)); |
| 280 | 285 | FRsdk::Image img(i); |
| 281 | 286 | |
| 282 | - // .01 here should be a parameter -cao | |
| 283 | - FRsdk::Face::LocationSet faceLocations = faceFinder->find(img, 0.01f); | |
| 287 | + FRsdk::Face::LocationSet faceLocations = faceFinder->find(img, minRelEyeDistance, maxRelEyeDistance); | |
| 284 | 288 | |
| 285 | 289 | // If the face finder doesn't find anything mark the output as a failure |
| 286 | 290 | if (faceLocations.empty() ) { |
| ... | ... | @@ -324,6 +328,9 @@ struct CT8Detect : public UntrainableTransform |
| 324 | 328 | |
| 325 | 329 | if (!Globals->enrollAll && dst.isEmpty()) dst += Mat(); |
| 326 | 330 | } |
| 331 | +private: | |
| 332 | + BR_PROPERTY(float, minRelEyeDistance, 0.01f) | |
| 333 | + BR_PROPERTY(float, maxRelEyeDistance, 0.4f) | |
| 327 | 334 | }; |
| 328 | 335 | |
| 329 | 336 | BR_REGISTER(Transform, CT8Detect) | ... | ... |