提交 2219e381 编写于 作者: V Vincent Rabaud

fix a potential crash when there are no keypoints

上级 630d874e
...@@ -891,6 +891,8 @@ void ORB::operator()(const Mat &image_in, const Mat &mask, vector<KeyPoint> & ke ...@@ -891,6 +891,8 @@ void ORB::operator()(const Mat &image_in, const Mat &mask, vector<KeyPoint> & ke
// Get the features and compute their orientation // Get the features and compute their orientation
vector<KeyPoint>& keypoints = all_keypoints[level]; vector<KeyPoint>& keypoints = all_keypoints[level];
int nkeypoints = (int)keypoints.size(); int nkeypoints = (int)keypoints.size();
if (nkeypoints==0)
continue;
// Compute the descriptors // Compute the descriptors
if (do_descriptors) if (do_descriptors)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册