Don't process empty src image in GFTT

pull/3379/head
Alexander Karsakov 10 years ago
parent fae2eb8a1a
commit 967a88759f
  1. 6
      modules/imgproc/src/featureselect.cpp

@ -275,6 +275,12 @@ void cv::goodFeaturesToTrack( InputArray _image, OutputArray _corners,
_mask, blockSize, useHarrisDetector, harrisK))
Mat image = _image.getMat(), eig, tmp;
if (image.empty())
{
_corners.release();
return;
}
if( useHarrisDetector )
cornerHarris( image, eig, blockSize, 3, harrisK );
else

Loading…
Cancel
Save