projects
/
platform
/
upstream
/
opencv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fbed6d1
)
fixed SIFT when keypoints vector is empty (#1162)
author
Maria Dimashova
<no@email>
Fri, 8 Jul 2011 15:54:57 +0000
(15:54 +0000)
committer
Maria Dimashova
<no@email>
Fri, 8 Jul 2011 15:54:57 +0000
(15:54 +0000)
modules/features2d/src/sift.cpp
patch
|
blob
|
history
diff --git
a/modules/features2d/src/sift.cpp
b/modules/features2d/src/sift.cpp
index
4cdf920
..
4203ebe
100644
(file)
--- a/
modules/features2d/src/sift.cpp
+++ b/
modules/features2d/src/sift.cpp
@@
-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++ )