mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 06:03:15 +08:00
fix a potential crash when there are no keypoints
This commit is contained in:
parent
630d874e03
commit
2219e38192
@ -891,6 +891,8 @@ void ORB::operator()(const Mat &image_in, const Mat &mask, vector<KeyPoint> & ke
|
||||
// Get the features and compute their orientation
|
||||
vector<KeyPoint>& keypoints = all_keypoints[level];
|
||||
int nkeypoints = (int)keypoints.size();
|
||||
if (nkeypoints==0)
|
||||
continue;
|
||||
|
||||
// Compute the descriptors
|
||||
if (do_descriptors)
|
||||
|
Loading…
Reference in New Issue
Block a user