Fixed number of warnings. Fixed mingw64 build.
This commit is contained in:
@@ -2191,15 +2191,15 @@ void cvCreateCascadeClassifier( const char* dirname,
|
||||
{
|
||||
char xml_path[1024];
|
||||
int len = (int)strlen(dirname);
|
||||
CvHaarClassifierCascade* cascade = 0;
|
||||
CvHaarClassifierCascade* cascade1 = 0;
|
||||
strcpy( xml_path, dirname );
|
||||
if( xml_path[len-1] == '\\' || xml_path[len-1] == '/' )
|
||||
len--;
|
||||
strcpy( xml_path + len, ".xml" );
|
||||
cascade = cvLoadHaarClassifierCascade( dirname, cvSize(winwidth,winheight) );
|
||||
if( cascade )
|
||||
cvSave( xml_path, cascade );
|
||||
cvReleaseHaarClassifierCascade( &cascade );
|
||||
cascade1 = cvLoadHaarClassifierCascade( dirname, cvSize(winwidth,winheight) );
|
||||
if( cascade1 )
|
||||
cvSave( xml_path, cascade1 );
|
||||
cvReleaseHaarClassifierCascade( &cascade1 );
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -2502,7 +2502,6 @@ void cvCreateTreeCascadeClassifier( const char* dirname,
|
||||
{
|
||||
CvTreeCascadeNode* single_cluster;
|
||||
CvTreeCascadeNode* multiple_clusters;
|
||||
CvSplit* cur_split;
|
||||
int single_num;
|
||||
|
||||
icvSetNumSamples( training_data, poscount + negcount );
|
||||
@@ -2675,18 +2674,19 @@ void cvCreateTreeCascadeClassifier( const char* dirname,
|
||||
} /* try different number of clusters */
|
||||
cvReleaseMat( &vals );
|
||||
|
||||
CV_CALL( cur_split = (CvSplit*) cvAlloc( sizeof( *cur_split ) ) );
|
||||
CV_ZERO_OBJ( cur_split );
|
||||
CvSplit* curSplit;
|
||||
CV_CALL( curSplit = (CvSplit*) cvAlloc( sizeof( *curSplit ) ) );
|
||||
CV_ZERO_OBJ( curSplit );
|
||||
|
||||
if( last_split ) last_split->next = cur_split;
|
||||
else first_split = cur_split;
|
||||
last_split = cur_split;
|
||||
if( last_split ) last_split->next = curSplit;
|
||||
else first_split = curSplit;
|
||||
last_split = curSplit;
|
||||
|
||||
cur_split->single_cluster = single_cluster;
|
||||
cur_split->multiple_clusters = multiple_clusters;
|
||||
cur_split->num_clusters = best_clusters;
|
||||
cur_split->parent = parent;
|
||||
cur_split->single_multiple_ratio = (float) single_num / best_num;
|
||||
curSplit->single_cluster = single_cluster;
|
||||
curSplit->multiple_clusters = multiple_clusters;
|
||||
curSplit->num_clusters = best_clusters;
|
||||
curSplit->parent = parent;
|
||||
curSplit->single_multiple_ratio = (float) single_num / best_num;
|
||||
}
|
||||
|
||||
if( parent ) parent = parent->next_same_level;
|
||||
|
||||
@@ -323,8 +323,6 @@ static void cvWarpPerspective( CvArr* src, CvArr* dst, double quad[4][2] )
|
||||
int i00, i10, i01, i11;
|
||||
i00 = i10 = i01 = i11 = (int) fill_value;
|
||||
|
||||
double i = fill_value;
|
||||
|
||||
/* linear interpolation using 2x2 neighborhood */
|
||||
if( isrc_x >= 0 && isrc_x <= src_size.width &&
|
||||
isrc_y >= 0 && isrc_y <= src_size.height )
|
||||
@@ -349,9 +347,8 @@ static void cvWarpPerspective( CvArr* src, CvArr* dst, double quad[4][2] )
|
||||
|
||||
double i0 = i00 + (i10 - i00)*delta_x;
|
||||
double i1 = i01 + (i11 - i01)*delta_x;
|
||||
i = i0 + (i1 - i0)*delta_y;
|
||||
|
||||
((uchar*)(dst_data + y * dst_step))[x] = (uchar) i;
|
||||
((uchar*)(dst_data + y * dst_step))[x] = (uchar) (i0 + (i1 - i0)*delta_y);
|
||||
}
|
||||
x_min += k_left;
|
||||
x_max += k_right;
|
||||
|
||||
@@ -214,7 +214,7 @@ int main( int argc, char* argv[] )
|
||||
totaltime = 0.0;
|
||||
if( info != NULL )
|
||||
{
|
||||
int x, y, width, height;
|
||||
int x, y;
|
||||
IplImage* img;
|
||||
int hits, missed, falseAlarms;
|
||||
int totalHits, totalMissed, totalFalseAlarms;
|
||||
@@ -249,11 +249,12 @@ int main( int argc, char* argv[] )
|
||||
ref = (ObjectPos*) cvAlloc( refcount * sizeof( *ref ) );
|
||||
for( i = 0; i < refcount; i++ )
|
||||
{
|
||||
error = (fscanf( info, "%d %d %d %d", &x, &y, &width, &height ) != 4);
|
||||
int w, h;
|
||||
error = (fscanf( info, "%d %d %d %d", &x, &y, &w, &h ) != 4);
|
||||
if( error ) break;
|
||||
ref[i].x = 0.5F * width + x;
|
||||
ref[i].y = 0.5F * height + y;
|
||||
ref[i].width = sqrtf( 0.5F * (width * width + height * height) );
|
||||
ref[i].x = 0.5F * w + x;
|
||||
ref[i].y = 0.5F * h + y;
|
||||
ref[i].width = sqrtf( 0.5F * (w * w + h * h) );
|
||||
ref[i].found = 0;
|
||||
ref[i].neghbors = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user