Merge pull request #3551 from serval2412:master
This commit is contained in:
commit
ba8a971742
@ -666,7 +666,7 @@ findStereoCorrespondenceBM( const Mat& left, const Mat& right,
|
||||
int thresh = minsad + (minsad * uniquenessRatio/100);
|
||||
for( d = 0; d < ndisp; d++ )
|
||||
{
|
||||
if( sad[d] <= thresh && (d < mind-1 || d > mind+1))
|
||||
if( (d < mind-1 || d > mind+1) && sad[d] <= thresh)
|
||||
break;
|
||||
}
|
||||
if( d < ndisp )
|
||||
|
@ -192,7 +192,7 @@ static ImageEncoder findEncoder( const String& _ext )
|
||||
if( !ext )
|
||||
return ImageEncoder();
|
||||
int len = 0;
|
||||
for( ext++; isalnum(ext[len]) && len < 128; len++ )
|
||||
for( ext++; len < 128 && isalnum(ext[len]); len++ )
|
||||
;
|
||||
|
||||
for( size_t i = 0; i < codecs.encoders.size(); i++ )
|
||||
@ -206,7 +206,7 @@ static ImageEncoder findEncoder( const String& _ext )
|
||||
if( !descr )
|
||||
break;
|
||||
int j = 0;
|
||||
for( descr++; isalnum(descr[j]) && j < len; j++ )
|
||||
for( descr++; j < len && isalnum(descr[j]) ; j++ )
|
||||
{
|
||||
int c1 = tolower(ext[j]);
|
||||
int c2 = tolower(descr[j]);
|
||||
|
@ -79,7 +79,7 @@ static bool findCircle( Point2f pt0, Point2f pt1, Point2f pt2,
|
||||
}
|
||||
|
||||
center->x = center->y = 0.f;
|
||||
radius = 0;
|
||||
*radius = 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -542,7 +542,7 @@ Mat LogisticRegressionImpl::remap_labels(const Mat& _labels_i, const map<int, in
|
||||
|
||||
Mat new_labels = Mat::zeros(labels.rows, labels.cols, labels.type());
|
||||
|
||||
CV_Assert( lmap.size() > 0 );
|
||||
CV_Assert( !lmap.empty() );
|
||||
|
||||
for(int i =0;i<labels.rows;i++)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user