提交 2cf3a6e2 编写于 作者: A Alexander Karsakov

Fixed error in case corners not found

上级 2aab7b29
......@@ -164,6 +164,12 @@ static bool ocl_goodFeaturesToTrack( InputArray _image, OutputArray _corners,
return false;
total = std::min<size_t>(counter.getMat(ACCESS_READ).at<int>(0, 0), possibleCornersCount);
if (total == 0)
{
_corners.release();
return true;
}
tmpCorners.resize(total);
Mat mcorners(1, (int)total, CV_32FC2, &tmpCorners[0]);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册