Merge pull request #2562 from akarsakov:gftt_fix
This commit is contained in:
commit
d1710a8547
@ -164,6 +164,12 @@ static bool ocl_goodFeaturesToTrack( InputArray _image, OutputArray _corners,
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
total = std::min<size_t>(counter.getMat(ACCESS_READ).at<int>(0, 0), possibleCornersCount);
|
total = std::min<size_t>(counter.getMat(ACCESS_READ).at<int>(0, 0), possibleCornersCount);
|
||||||
|
if (total == 0)
|
||||||
|
{
|
||||||
|
_corners.release();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
tmpCorners.resize(total);
|
tmpCorners.resize(total);
|
||||||
|
|
||||||
Mat mcorners(1, (int)total, CV_32FC2, &tmpCorners[0]);
|
Mat mcorners(1, (int)total, CV_32FC2, &tmpCorners[0]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user