1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 07:43:03 +04:00

fixed SIFT when keypoints vector is empty (#1162)

This commit is contained in:
Maria Dimashova
2011-07-08 15:54:57 +00:00
parent fbed6d1d44
commit 0b1575c485
+2 -1
View File
@@ -1722,7 +1722,8 @@ void SIFT::operator()(const Mat& image, const Mat& mask,
KeyPointsFilter::removeDuplicated( keypoints );
// Compute descriptors.
cvSeqRemoveSlice( featuresSeq, cvSlice(0, featuresSeq->total) );
if( featuresSeq->total > 0 )
cvSeqRemoveSlice( featuresSeq, cvSlice(0, featuresSeq->total) );
}
for( size_t i = 0; i < keypoints.size(); i++ )