ocl: fix warnings from GCC 4.8, update Haar
This commit is contained in:
parent
d5723480e1
commit
723af15228
@ -1290,14 +1290,14 @@ void CV_FitLineTest::generate_point_set( void* pointsSet )
|
|||||||
t = (float)((cvtest::randReal(rng)-0.5)*low_high_range*2);
|
t = (float)((cvtest::randReal(rng)-0.5)*low_high_range*2);
|
||||||
|
|
||||||
for( k = 0; k < n; k++ )
|
for( k = 0; k < n; k++ )
|
||||||
|
{
|
||||||
p[k] = (float)((cvtest::randReal(rng)-0.5)*max_noise*2 + t*line0[k] + line0[k+n]);
|
p[k] = (float)((cvtest::randReal(rng)-0.5)*max_noise*2 + t*line0[k] + line0[k+n]);
|
||||||
|
|
||||||
if( point_type == CV_32S )
|
if( point_type == CV_32S )
|
||||||
for( k = 0; k < n; k++ )
|
|
||||||
pi[k] = cvRound(p[k]);
|
pi[k] = cvRound(p[k]);
|
||||||
else
|
else
|
||||||
for( k = 0; k < n; k++ )
|
|
||||||
pf[k] = p[k];
|
pf[k] = p[k];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -625,37 +625,21 @@ static void gpuSetHaarClassifierCascade( CvHaarClassifierCascade *_cascade)
|
|||||||
cascade->p3 = equRect.width ;
|
cascade->p3 = equRect.width ;
|
||||||
for( i = 0; i < _cascade->count; i++ )
|
for( i = 0; i < _cascade->count; i++ )
|
||||||
{
|
{
|
||||||
int j, k, l;
|
int j, l;
|
||||||
for( j = 0; j < stage_classifier[i].count; j++ )
|
for( j = 0; j < stage_classifier[i].count; j++ )
|
||||||
{
|
{
|
||||||
for( l = 0; l < stage_classifier[i].classifier[j].count; l++ )
|
for( l = 0; l < stage_classifier[i].classifier[j].count; l++ )
|
||||||
{
|
{
|
||||||
CvHaarFeature *feature =
|
const CvHaarFeature *feature =
|
||||||
&_cascade->stage_classifier[i].classifier[j].haar_feature[l];
|
&_cascade->stage_classifier[i].classifier[j].haar_feature[l];
|
||||||
GpuHidHaarTreeNode *hidnode = &stage_classifier[i].classifier[j].node[l];
|
GpuHidHaarTreeNode *hidnode = &stage_classifier[i].classifier[j].node[l];
|
||||||
CvRect r[3];
|
|
||||||
|
|
||||||
|
for( int k = 0; k < CV_HAAR_FEATURE_MAX; k++ )
|
||||||
int nr;
|
|
||||||
|
|
||||||
/* align blocks */
|
|
||||||
for( k = 0; k < CV_HAAR_FEATURE_MAX; k++ )
|
|
||||||
{
|
{
|
||||||
if(!hidnode->p[k][0])
|
const CvRect tr = feature->rect[k].r;
|
||||||
|
if (tr.width == 0)
|
||||||
break;
|
break;
|
||||||
r[k] = feature->rect[k].r;
|
double correction_ratio = weight_scale * (!feature->tilted ? 1 : 0.5);
|
||||||
}
|
|
||||||
|
|
||||||
nr = k;
|
|
||||||
for( k = 0; k < nr; k++ )
|
|
||||||
{
|
|
||||||
CvRect tr;
|
|
||||||
double correction_ratio;
|
|
||||||
tr.x = r[k].x;
|
|
||||||
tr.width = r[k].width;
|
|
||||||
tr.y = r[k].y ;
|
|
||||||
tr.height = r[k].height;
|
|
||||||
correction_ratio = weight_scale * (!feature->tilted ? 1 : 0.5);
|
|
||||||
hidnode->p[k][0] = tr.x;
|
hidnode->p[k][0] = tr.x;
|
||||||
hidnode->p[k][1] = tr.y;
|
hidnode->p[k][1] = tr.y;
|
||||||
hidnode->p[k][2] = tr.width;
|
hidnode->p[k][2] = tr.width;
|
||||||
|
Loading…
Reference in New Issue
Block a user