Commit e8b0d279 authored by Andrey Kamaev's avatar Andrey Kamaev

Fixed cvExtractSURF in case of no keypoints found #2076

parent d60b1f2f
......@@ -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++ )
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment