Fixed cvExtractSURF in case of no keypoints found #2076

This commit is contained in:
Andrey Kamaev 2012-06-28 05:59:30 +00:00
parent d60b1f2f82
commit e8b0d27942

View File

@ -89,7 +89,7 @@ cvExtractSURF( const CvArr* _img, const CvArr* _mask,
*_keypoints = cvCreateSeq(0, sizeof(CvSeq), sizeof(CvSURFPoint), storage);
if( _descriptors )
*_descriptors = cvCreateSeq(0, sizeof(CvSeq), descr.cols*descr.elemSize(), storage);
*_descriptors = cvCreateSeq(0, sizeof(CvSeq), surf->descriptorSize() * CV_ELEM_SIZE(surf->descriptorType()), storage);
for( size_t i = 0; i < kpt.size(); i++ )
{