Commit 69731d5a965b6b12bb8a7d26bad171492be2816b
1 parent
0b1231ea
Skip keypoint description if there are no keypoints
Showing
1 changed file
with
1 additions
and
0 deletions
openbr/plugins/keypoint.cpp
| ... | ... | @@ -97,6 +97,7 @@ class KeyPointDescriptorTransform : public UntrainableTransform |
| 97 | 97 | else |
| 98 | 98 | foreach (const QPointF &landmark, src.file.points()) |
| 99 | 99 | keyPoints.push_back(KeyPoint(landmark.x(), landmark.y(), size)); |
| 100 | + if (keyPoints.empty()) return; | |
| 100 | 101 | descriptorExtractor->compute(src, keyPoints, dst); |
| 101 | 102 | } |
| 102 | 103 | }; | ... | ... |