put extra check to cv::findChessboardCorners (ticket #648)

This commit is contained in:
Vadim Pisarevsky 2010-11-09 15:45:56 +00:00
parent 7f3ae3a011
commit 9130d5bae1

View File

@ -1904,7 +1904,8 @@ bool findChessboardCorners( const Mat& image, Size patternSize,
CvMat _image = image;
bool ok = cvFindChessboardCorners(&_image, patternSize,
(CvPoint2D32f*)&corners[0], &count, flags ) > 0;
corners.resize(count);
if(count >= 0)
corners.resize(count);
return ok;
}