Fixed error in case corners not found

pull/2562/head
Alexander Karsakov 11 years ago
parent 2aab7b2926
commit 2cf3a6e26c
  1. 6
      modules/imgproc/src/featureselect.cpp

@ -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…
Cancel
Save