Commit 9830541889020ef17b5342624222a435737004c9
1 parent
768f1515
HoG should add each descriptor to dst
Showing
1 changed file
with
5 additions
and
3 deletions
openbr/plugins/keypoint.cpp
| @@ -194,9 +194,11 @@ class HoGDescriptorTransform : public UntrainableTransform | @@ -194,9 +194,11 @@ class HoGDescriptorTransform : public UntrainableTransform | ||
| 194 | std::vector<Point> locations; | 194 | std::vector<Point> locations; |
| 195 | Size winStride = Size(0,0); | 195 | Size winStride = Size(0,0); |
| 196 | Size padding = Size(0,0); | 196 | Size padding = Size(0,0); |
| 197 | - hog.compute(src, descriptorVals, winStride, padding, locations); | ||
| 198 | - Mat HoGFeats = Mat(descriptorVals, true); | ||
| 199 | - dst += HoGFeats; | 197 | + foreach (const Mat &rect, src) { |
| 198 | + hog.compute(rect, descriptorVals, winStride, padding, locations); | ||
| 199 | + Mat HoGFeats(descriptorVals, true); | ||
| 200 | + dst += HoGFeats; | ||
| 201 | + } | ||
| 200 | } | 202 | } |
| 201 | }; | 203 | }; |
| 202 | 204 |