Fixed cvExtractSURF in case of no keypoints found #2076
This commit is contained in:
parent
d60b1f2f82
commit
e8b0d27942
@ -17,16 +17,16 @@
|
|||||||
* Redistribution and use in source and binary forms, with or
|
* Redistribution and use in source and binary forms, with or
|
||||||
* without modification, are permitted provided that the following
|
* without modification, are permitted provided that the following
|
||||||
* conditions are met:
|
* conditions are met:
|
||||||
* Redistributions of source code must retain the above
|
* Redistributions of source code must retain the above
|
||||||
* copyright notice, this list of conditions and the following
|
* copyright notice, this list of conditions and the following
|
||||||
* disclaimer.
|
* disclaimer.
|
||||||
* Redistributions in binary form must reproduce the above
|
* Redistributions in binary form must reproduce the above
|
||||||
* copyright notice, this list of conditions and the following
|
* copyright notice, this list of conditions and the following
|
||||||
* disclaimer in the documentation and/or other materials
|
* disclaimer in the documentation and/or other materials
|
||||||
* provided with the distribution.
|
* provided with the distribution.
|
||||||
* The name of Contributor may not be used to endorse or
|
* The name of Contributor may not be used to endorse or
|
||||||
* promote products derived from this software without
|
* promote products derived from this software without
|
||||||
* specific prior written permission.
|
* specific prior written permission.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||||
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||||
@ -89,7 +89,7 @@ cvExtractSURF( const CvArr* _img, const CvArr* _mask,
|
|||||||
*_keypoints = cvCreateSeq(0, sizeof(CvSeq), sizeof(CvSURFPoint), storage);
|
*_keypoints = cvCreateSeq(0, sizeof(CvSeq), sizeof(CvSURFPoint), storage);
|
||||||
|
|
||||||
if( _descriptors )
|
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++ )
|
for( size_t i = 0; i < kpt.size(); i++ )
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user