Fixed mingw build.
This commit is contained in:
@@ -446,15 +446,15 @@ static int getPathOfFeaturePyramid(IplImage * image,
|
||||
CvLSVMFeatureMap *map;
|
||||
IplImage *scaleTmp;
|
||||
float scale;
|
||||
int i, err;
|
||||
int i;
|
||||
|
||||
for(i = 0; i < numStep; i++)
|
||||
{
|
||||
scale = 1.0f / powf(step, (float)i);
|
||||
scaleTmp = resize_opencv (image, scale);
|
||||
err = getFeatureMaps(scaleTmp, sideLength, &map);
|
||||
err = normalizeAndTruncate(map, VAL_OF_TRUNCATE);
|
||||
err = PCAFeatureMaps(map);
|
||||
getFeatureMaps(scaleTmp, sideLength, &map);
|
||||
normalizeAndTruncate(map, VAL_OF_TRUNCATE);
|
||||
PCAFeatureMaps(map);
|
||||
(*maps)->pyramid[startIndex + i] = map;
|
||||
cvReleaseImage(&scaleTmp);
|
||||
}/*for(i = 0; i < numStep; i++)*/
|
||||
|
@@ -560,7 +560,7 @@ int searchObjectThresholdSomeComponents(const CvLSVMFeaturePyramid *H,
|
||||
float **score, int *kPoints,
|
||||
int numThreads)
|
||||
{
|
||||
int error = 0;
|
||||
//int error = 0;
|
||||
int i, j, s, f, componentIndex;
|
||||
unsigned int maxXBorder, maxYBorder;
|
||||
CvPoint **pointsArr, **oppPointsArr, ***partsDisplacementArr;
|
||||
@@ -576,14 +576,14 @@ int searchObjectThresholdSomeComponents(const CvLSVMFeaturePyramid *H,
|
||||
partsDisplacementArr = (CvPoint ***)malloc(sizeof(CvPoint **) * kComponents);
|
||||
|
||||
// Getting maximum filter dimensions
|
||||
error = getMaxFilterDims(filters, kComponents, kPartFilters, &maxXBorder, &maxYBorder);
|
||||
/*error = */getMaxFilterDims(filters, kComponents, kPartFilters, &maxXBorder, &maxYBorder);
|
||||
componentIndex = 0;
|
||||
*kPoints = 0;
|
||||
// For each component perform searching
|
||||
for (i = 0; i < kComponents; i++)
|
||||
{
|
||||
#ifdef HAVE_TBB
|
||||
error = searchObjectThreshold(H, &(filters[componentIndex]), kPartFilters[i],
|
||||
/*error = */searchObjectThreshold(H, &(filters[componentIndex]), kPartFilters[i],
|
||||
b[i], maxXBorder, maxYBorder, scoreThreshold,
|
||||
&(pointsArr[i]), &(levelsArr[i]), &(kPointsArr[i]),
|
||||
&(scoreArr[i]), &(partsDisplacementArr[i]), numThreads);
|
||||
|
@@ -534,12 +534,12 @@ void parserPFilterS (FILE * xmlf, int p, CvLSVMFilterObject *** model, int *last
|
||||
int tag;
|
||||
int tagVal;
|
||||
char ch;
|
||||
int i,j;
|
||||
char buf[1024];
|
||||
int /*i,*/j;
|
||||
//char buf[1024];
|
||||
char tagBuf[1024];
|
||||
//printf("<PartFilters>\n");
|
||||
|
||||
i = 0;
|
||||
//i = 0;
|
||||
j = 0;
|
||||
st = 0;
|
||||
tag = 0;
|
||||
@@ -566,10 +566,10 @@ void parserPFilterS (FILE * xmlf, int p, CvLSVMFilterObject *** model, int *last
|
||||
N_path++;
|
||||
}
|
||||
tag = 0;
|
||||
i = 0;
|
||||
//i = 0;
|
||||
}else{
|
||||
if((tag == 0)&& (st == 1)){
|
||||
buf[i] = ch; i++;
|
||||
//buf[i] = ch; i++;
|
||||
}else{
|
||||
tagBuf[j] = ch; j++;
|
||||
}
|
||||
@@ -582,12 +582,12 @@ void parserComp (FILE * xmlf, int p, int *N_comp, CvLSVMFilterObject *** model,
|
||||
int tag;
|
||||
int tagVal;
|
||||
char ch;
|
||||
int i,j;
|
||||
char buf[1024];
|
||||
int /*i,*/j;
|
||||
//char buf[1024];
|
||||
char tagBuf[1024];
|
||||
//printf("<Component> %d\n", *N_comp);
|
||||
|
||||
i = 0;
|
||||
//i = 0;
|
||||
j = 0;
|
||||
st = 0;
|
||||
tag = 0;
|
||||
@@ -616,10 +616,10 @@ void parserComp (FILE * xmlf, int p, int *N_comp, CvLSVMFilterObject *** model,
|
||||
parserPFilterS (xmlf, p, model, last, max);
|
||||
}
|
||||
tag = 0;
|
||||
i = 0;
|
||||
//i = 0;
|
||||
}else{
|
||||
if((tag == 0)&& (st == 1)){
|
||||
buf[i] = ch; i++;
|
||||
//buf[i] = ch; i++;
|
||||
}else{
|
||||
tagBuf[j] = ch; j++;
|
||||
}
|
||||
@@ -726,12 +726,12 @@ void parserModel(FILE * xmlf, CvLSVMFilterObject *** model, int *last, int *max,
|
||||
}//namespace
|
||||
|
||||
int LSVMparser(const char * filename, CvLSVMFilterObject *** model, int *last, int *max, int **comp, float **b, int *count, float * score){
|
||||
int st = 0;
|
||||
//int st = 0;
|
||||
int tag;
|
||||
char ch;
|
||||
int i,j;
|
||||
int /*i,*/j;
|
||||
FILE *xmlf;
|
||||
char buf[1024];
|
||||
//char buf[1024];
|
||||
char tagBuf[1024];
|
||||
|
||||
(*max) = 10;
|
||||
@@ -744,9 +744,9 @@ int LSVMparser(const char * filename, CvLSVMFilterObject *** model, int *last, i
|
||||
if(xmlf == NULL)
|
||||
return LSVM_PARSER_FILE_NOT_FOUND;
|
||||
|
||||
i = 0;
|
||||
//i = 0;
|
||||
j = 0;
|
||||
st = 0;
|
||||
//st = 0;
|
||||
tag = 0;
|
||||
while(!feof(xmlf)){
|
||||
ch = (char)fgetc( xmlf );
|
||||
@@ -757,7 +757,7 @@ int LSVMparser(const char * filename, CvLSVMFilterObject *** model, int *last, i
|
||||
}else {
|
||||
if(ch == '>'){
|
||||
tag = 0;
|
||||
i = 0;
|
||||
//i = 0;
|
||||
tagBuf[j ] = ch;
|
||||
tagBuf[j + 1] = '\0';
|
||||
if(getTeg(tagBuf) == MODEL){
|
||||
@@ -765,7 +765,7 @@ int LSVMparser(const char * filename, CvLSVMFilterObject *** model, int *last, i
|
||||
}
|
||||
}else{
|
||||
if(tag == 0){
|
||||
buf[i] = ch; i++;
|
||||
//buf[i] = ch; i++;
|
||||
}else{
|
||||
tagBuf[j] = ch; j++;
|
||||
}
|
||||
|
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
int convolution(const CvLSVMFilterObject *Fi, const CvLSVMFeatureMap *map, float *f)
|
||||
{
|
||||
int n1, m1, n2, m2, p, size, diff1, diff2;
|
||||
int n1, m1, n2, m2, p, /*size,*/ diff1, diff2;
|
||||
int i1, i2, j1, j2, k;
|
||||
float tmp_f1, tmp_f2, tmp_f3, tmp_f4;
|
||||
float *pMap = NULL;
|
||||
@@ -37,7 +37,7 @@ int convolution(const CvLSVMFilterObject *Fi, const CvLSVMFeatureMap *map, float
|
||||
|
||||
diff1 = n1 - n2 + 1;
|
||||
diff2 = m1 - m2 + 1;
|
||||
size = diff1 * diff2;
|
||||
//size = diff1 * diff2;
|
||||
for (j1 = diff2 - 1; j1 >= 0; j1--)
|
||||
{
|
||||
|
||||
@@ -333,7 +333,7 @@ int filterDispositionLevel(const CvLSVMFilterObject *Fi, const CvLSVMFeatureMap
|
||||
float **scoreFi,
|
||||
int **pointsX, int **pointsY)
|
||||
{
|
||||
int n1, m1, n2, m2, p, size, diff1, diff2;
|
||||
int n1, m1, n2, m2, /*p,*/ size, diff1, diff2;
|
||||
float *f;
|
||||
int i1, j1;
|
||||
int res;
|
||||
@@ -342,7 +342,7 @@ int filterDispositionLevel(const CvLSVMFilterObject *Fi, const CvLSVMFeatureMap
|
||||
m1 = pyramid->sizeX;
|
||||
n2 = Fi->sizeY;
|
||||
m2 = Fi->sizeX;
|
||||
p = pyramid->numFeatures;
|
||||
//p = pyramid->numFeatures;
|
||||
(*scoreFi) = NULL;
|
||||
(*pointsX) = NULL;
|
||||
(*pointsY) = NULL;
|
||||
@@ -418,7 +418,7 @@ int filterDispositionLevelFFT(const CvLSVMFilterObject *Fi, const CvLSVMFftImage
|
||||
float **scoreFi,
|
||||
int **pointsX, int **pointsY)
|
||||
{
|
||||
int n1, m1, n2, m2, p, size, diff1, diff2;
|
||||
int n1, m1, n2, m2, /*p,*/ size, diff1, diff2;
|
||||
float *f;
|
||||
int i1, j1;
|
||||
int res;
|
||||
@@ -428,7 +428,7 @@ int filterDispositionLevelFFT(const CvLSVMFilterObject *Fi, const CvLSVMFftImage
|
||||
m1 = featMapImage->dimX;
|
||||
n2 = Fi->sizeY;
|
||||
m2 = Fi->sizeX;
|
||||
p = featMapImage->numFeatures;
|
||||
//p = featMapImage->numFeatures;
|
||||
(*scoreFi) = NULL;
|
||||
(*pointsX) = NULL;
|
||||
(*pointsY) = NULL;
|
||||
@@ -611,7 +611,7 @@ int maxFunctionalScoreFixedLevel(const CvLSVMFilterObject **all_F, int n,
|
||||
float *score, CvPoint **points,
|
||||
int *kPoints, CvPoint ***partsDisplacement)
|
||||
{
|
||||
int i, j, k, dimX, dimY, nF0, mF0, p;
|
||||
int i, j, k, dimX, dimY, nF0, mF0/*, p*/;
|
||||
int diff1, diff2, index, last, partsLevel;
|
||||
CvLSVMFilterDisposition **disposition;
|
||||
float *f;
|
||||
@@ -639,7 +639,7 @@ int maxFunctionalScoreFixedLevel(const CvLSVMFilterObject **all_F, int n,
|
||||
dimY = H->pyramid[level]->sizeY;
|
||||
|
||||
// Number of features
|
||||
p = H->pyramid[level]->numFeatures;
|
||||
//p = H->pyramid[level]->numFeatures;
|
||||
|
||||
// Getting dimension of root filter
|
||||
nF0 = all_F[0]->sizeY;
|
||||
@@ -860,7 +860,7 @@ int thresholdFunctionalScoreFixedLevel(const CvLSVMFilterObject **all_F, int n,
|
||||
float **score, CvPoint **points, int *kPoints,
|
||||
CvPoint ***partsDisplacement)
|
||||
{
|
||||
int i, j, k, dimX, dimY, nF0, mF0, p;
|
||||
int i, j, k, dimX, dimY, nF0, mF0/*, p*/;
|
||||
int diff1, diff2, index, last, partsLevel;
|
||||
CvLSVMFilterDisposition **disposition;
|
||||
float *f;
|
||||
@@ -887,7 +887,7 @@ int thresholdFunctionalScoreFixedLevel(const CvLSVMFilterObject **all_F, int n,
|
||||
dimY = H->pyramid[level]->sizeY;
|
||||
|
||||
// Number of features
|
||||
p = H->pyramid[level]->numFeatures;
|
||||
//p = H->pyramid[level]->numFeatures;
|
||||
|
||||
// Getting dimension of root filter
|
||||
nF0 = all_F[0]->sizeY;
|
||||
|
Reference in New Issue
Block a user