mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 06:03:15 +08:00
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;
|
||||
|
||||
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]);
|
||||
|
Loading…
Reference in New Issue
Block a user