Commit be4187e4fdbca140b46bd4b598e5c4c5f9588313
1 parent
0eb06161
Tweaked meantransform a bit
Showing
2 changed files
with
5 additions
and
5 deletions
openbr/plugins/algorithms.cpp
| ... | ... | @@ -46,7 +46,7 @@ class AlgorithmsInitializer : public Initializer |
| 46 | 46 | Globals->abbreviations.insert("CropFace", "Open+Cvt(Gray)+Cascade(FrontalFace)+ASEFEyes+Affine(128,128,0.25,0.35)"); |
| 47 | 47 | |
| 48 | 48 | // Video |
| 49 | - Globals->abbreviations.insert("DisplayVideo", "Stream([Cvt(Gray)+Resize(400,640)+Stasm+Delauney(true)+Draw(inPlace=true)+Show(false)+Discard])"); | |
| 49 | + Globals->abbreviations.insert("DisplayVideo", "Stream([Show(false)+Discard])"); | |
| 50 | 50 | Globals->abbreviations.insert("PerFrameDetection", "Stream([SaveMat(original)+Cvt(Gray)+Cascade(FrontalFace)+ASEFEyes+RestoreMat(original)+Draw(inPlace=true),Show(false)+Discard])"); |
| 51 | 51 | Globals->abbreviations.insert("AgeGenderDemo", "Stream([SaveMat(original)+Cvt(Gray)+Cascade(FrontalFace)+Expand+<FaceClassificationRegistration>+<FaceClassificationExtraction>+(<AgeRegressor>+Rename(Subject,Age)+Discard)/(<GenderClassifier>+Rename(Subject,Gender)+Discard)+RestoreMat(original)+Draw(inPlace=true)+DrawPropertiesPoint([Age,Gender],Affine_0,inPlace=true)+SaveMat(original)+Discard+Contract,RestoreMat(original)+FPSCalc+Show(false,[AvgFPS,Age,Gender])+Discard])"); |
| 52 | 52 | ... | ... |
openbr/plugins/landmarks.cpp
| ... | ... | @@ -276,7 +276,7 @@ class DelaunayTransform : public UntrainableTransform |
| 276 | 276 | |
| 277 | 277 | bitwise_and(buffer,mask,output); |
| 278 | 278 | |
| 279 | - dst.m() += output; // Need to xor stuff out | |
| 279 | + dst.m() += output; | |
| 280 | 280 | } |
| 281 | 281 | |
| 282 | 282 | Rect boundingBox = boundingRect(mappedPoints.toVector().toStdVector()); |
| ... | ... | @@ -295,7 +295,7 @@ BR_REGISTER(Transform, DelaunayTransform) |
| 295 | 295 | |
| 296 | 296 | /*! |
| 297 | 297 | * \ingroup transforms |
| 298 | - * \brief Wraps STASM key point detector | |
| 298 | + * \brief Computes the mean of a set of templates. Suitable for visualization only as it sets every projected template to the mean template. | |
| 299 | 299 | * \author Scott Klum \cite sklum |
| 300 | 300 | */ |
| 301 | 301 | class MeanTransform : public Transform |
| ... | ... | @@ -308,13 +308,13 @@ class MeanTransform : public Transform |
| 308 | 308 | { |
| 309 | 309 | mean = Mat::zeros(data[0].m().rows,data[0].m().cols,CV_32F); |
| 310 | 310 | |
| 311 | - for (int i = 0; i < data.size()/2; i++) { | |
| 311 | + for (int i = 0; i < data.size(); i++) { | |
| 312 | 312 | Mat converted; |
| 313 | 313 | data[i].m().convertTo(converted, CV_32F); |
| 314 | 314 | mean += converted; |
| 315 | 315 | } |
| 316 | 316 | |
| 317 | - mean /= data.size()/2; | |
| 317 | + mean /= data.size(); | |
| 318 | 318 | } |
| 319 | 319 | |
| 320 | 320 | void project(const Template &src, Template &dst) const | ... | ... |