- make sure we don't crash for an empty image
This commit is contained in:
parent
74cc1803c4
commit
3e1b0186fe
@ -532,7 +532,7 @@ void ORB::operator()(const cv::Mat &image, const cv::Mat &mask, std::vector<cv::
|
|||||||
void ORB::operator()(const cv::Mat &image_in, const cv::Mat &mask, std::vector<cv::KeyPoint> & keypoints_in_out,
|
void ORB::operator()(const cv::Mat &image_in, const cv::Mat &mask, std::vector<cv::KeyPoint> & keypoints_in_out,
|
||||||
cv::Mat & descriptors, bool do_keypoints, bool do_descriptors)
|
cv::Mat & descriptors, bool do_keypoints, bool do_descriptors)
|
||||||
{
|
{
|
||||||
if ((!do_keypoints) && (!do_descriptors))
|
if (((!do_keypoints) && (!do_descriptors)) || (image_in.empty()))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
cv::Mat image;
|
cv::Mat image;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user