Don't process empty src image in GFTT
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user