Skip to content

Commit 5002e93

Browse files
committed
Now when the element of the vector is removed j does not increase
1 parent d180eb7 commit 5002e93

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

modules/line_descriptor/src/binary_descriptor.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,11 +625,12 @@ void BinaryDescriptor::computeImpl( const Mat& imageSrc, std::vector<KeyLine>& k
625625
/* delete useless OctaveSingleLines */
626626
for ( size_t i = 0; i < sl.size(); i++ )
627627
{
628-
for ( size_t j = 0; j < sl[i].size(); j++ )
628+
for ( size_t j = 0; j < sl[i].size(); )
629629
{
630630
//if( (int) ( sl[i][j] ).octaveCount > params.numOfOctave_ )
631631
if( (int) ( sl[i][j] ).octaveCount > octaveIndex )
632632
( sl[i] ).erase( ( sl[i] ).begin() + j );
633+
else j++;
633634
}
634635
}
635636

0 commit comments

Comments
 (0)