added another contour perimeter test and fixed bug #216

This commit is contained in:
Vadim Pisarevsky
2012-03-26 17:00:48 +00:00
parent 26691e00d4
commit 903c05db1a
3 changed files with 91 additions and 9 deletions

View File

@@ -523,13 +523,9 @@ cvSliceLength( CvSlice slice, const CvSeq* seq )
length = slice.end_index - slice.start_index;
}
if( length < 0 )
{
while( length < 0 )
length += total;
/*if( length < 0 )
length += total;*/
}
else if( length > total )
if( length > total )
length = total;
return length;