Merge pull request #2562 from akarsakov:gftt_fix

This commit is contained in:
Andrey Pavlenko 2014-04-04 13:34:30 +04:00 committed by OpenCV Buildbot
commit d1710a8547

View File

@ -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]);