Commit 4a14795e authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

fixed several gcc 4.1 warnings

parent b80bdf32
......@@ -122,8 +122,9 @@ class FLANNException : public std::runtime_error {
struct CV_EXPORTS IndexParams {
protected:
IndexParams(flann_algorithm_t algorithm_) : algorithm(algorithm_) {};
public:
virtual ~IndexParams() {}
virtual flann_algorithm_t getIndexType() const = 0;
virtual void print() const = 0;
......
......@@ -591,7 +591,7 @@ icvApproxPolyDP( CvSeq* src_contour, int header_size,
for( i = slice.start_index + 1; i < slice.end_index; i++ )
{
CV_READ_SEQ_ELEM( pt, reader );
dist = abs((pt.y - start_pt.y) * dx - (pt.x - start_pt.x) * dy);
dist = fabs((pt.y - start_pt.y) * dx - (pt.x - start_pt.x) * dy);
if( dist > max_dist )
{
......@@ -647,7 +647,7 @@ icvApproxPolyDP( CvSeq* src_contour, int header_size,
dx = end_pt.x - start_pt.x;
dy = end_pt.y - start_pt.y;
dist = abs((pt.x - start_pt.x)*dy - (pt.y - start_pt.y)*dx);
dist = fabs((pt.x - start_pt.x)*dy - (pt.y - start_pt.y)*dx);
if( dist * dist <= 0.5*eps*(dx*dx + dy*dy) && dx != 0 && dy != 0 )
{
new_count--;
......
......@@ -2,8 +2,8 @@
/* Latent SVM prediction API */
/*****************************************************************************/
#ifndef SVM_LATENTSVM
#define SVM_LATENTSVM
#ifndef _LATENTSVM_H_
#define _LATENTSVM_H_
#include <stdio.h>
#include "_lsvm_types.h"
......@@ -397,4 +397,4 @@ int showBoxes(IplImage *img,
const CvPoint *points, const CvPoint *oppositePoints, int kPoints,
CvScalar color, int thickness, int line_type, int shift);
#endif
\ No newline at end of file
#endif
#ifndef LSVM_DIST_TRANSFORM
#define LSVM_DIST_TRANSFORM
#ifndef _LSVM_DIST_TRANSFORM_H_
#define _LSVM_DIST_TRANSFORM_H_
#include "_lsvm_types.h"
#include "_lsvm_error.h"
......@@ -135,4 +135,4 @@ int DistanceTransformTwoDimensionalProblem(const float *f,
float *distanceTransform,
int *pointsX, int *pointsY);
#endif
\ No newline at end of file
#endif
#ifndef _LSVM_FFT_H
#define _LSVM_FFT_H
#ifndef _LSVM_FFT_H_
#define _LSVM_FFT_H_
#include "_lsvm_types.h"
#include "_lsvm_error.h"
......@@ -76,4 +76,4 @@ int fft2d(float *x_in, float *x_out, int numRows, int numColls);
*/
int fftInverse2d(float *x_in, float *x_out, int numRows, int numColls);
#endif
\ No newline at end of file
#endif
......@@ -2,8 +2,8 @@
/* Matching procedure API */
/*****************************************************************************/
//
#ifndef SVM_MATCHING
#define SVM_MATCHING
#ifndef _LSVM_MATCHING_H_
#define _LSVM_MATCHING_H_
#include "_latentsvm.h"
#include "_lsvm_error.h"
......
#ifndef RESIZEIMG
#define RESIZEIMG
#ifndef _LSVM_RESIZEIMG_H_
#define _LSVM_RESIZEIMG_H_
#include "_lsvm_types.h"
......@@ -7,4 +7,4 @@ IplImage * resize_opencv (IplImage * img, float scale);
IplImage * resize_article_dp1(IplImage * img, float scale, const int k);
IplImage * resize_article_dp(IplImage * img, float scale, const int k);
#endif
\ No newline at end of file
#endif
#ifndef _LSVM_ROUTINE_H
#define _LSVM_ROUTINE_H
#ifndef _LSVM_ROUTINE_H_
#define _LSVM_ROUTINE_H_
#include "_lsvm_types.h"
#include "_lsvm_error.h"
......@@ -32,4 +32,4 @@ extern "C"
int freeFeaturePyramidObject (CvLSVMFeaturePyramid **obj);
int allocFFTImage(CvLSVMFftImage **image, int p, int dimX, int dimY);
int freeFFTImage(CvLSVMFftImage **image);
#endif
\ No newline at end of file
#endif
......@@ -7,6 +7,7 @@
// a(y - q1) + b(q1 - y)(q1 - y) + f[q1]
// a(y - q2) + b(q2 - y)(q2 - y) + f[q2]
//
//
// API
// int GetPointOfIntersection(const float *f,
const float a, const float b,
......@@ -393,4 +394,4 @@ int DistanceTransformTwoDimensionalProblem(const float *f,
free(internalDistTrans);
free(internalPointsX);
return DISTANCE_TRANSFORM_OK;
}
\ No newline at end of file
}
......@@ -10,7 +10,7 @@
#define min(a,b) (((a) < (b)) ? (a) : (b))
#endif
int sign(float r){
static inline int sign(float r){
if(r > 0.0001f) return 1;
if(r < -0.0001f) return -1;
return 0;
......@@ -574,4 +574,4 @@ int addBordersToFeatureMaps(CvLSVMFeatureMap *map, const int bX, const int bY){
map->Map = new_data;
return LATENT_SVM_OK;
}
\ No newline at end of file
}
......@@ -9,7 +9,7 @@
// CvLatentSvmDetector* cvLoadLatentSvmDetector(const char* filename);
// INPUT
// filename - path to the file containing the parameters of
- trained Latent SVM detector
// - trained Latent SVM detector
// OUTPUT
// trained Latent SVM detector in internal representation
*/
......@@ -133,4 +133,4 @@ CvSeq* cvLatentSvmDetectObjects(IplImage* image,
free(score);
return result_seq;
}
\ No newline at end of file
}
......@@ -803,6 +803,5 @@ int loadModel(
}
(*kPartFilters)[0] = comp[0];
//printf("end_parse\n");
return 0;
}
\ No newline at end of file
}
......@@ -256,7 +256,7 @@ int convFFTConv2d(const CvLSVMFftImage *featMapImage, const CvLSVMFftImage *filt
imagesMultRes = (float *)malloc(sizeof(float) * size);
fftImagesMulti(featMapImage->channels[0], filterImage->channels[0],
featMapImage->dimY, featMapImage->dimX, imagesMultRes);
for (i = 1; (i < featMapImage->p) && (i < filterImage->p); i++)
for (i = 1; (i < (int)featMapImage->p) && (i < (int)filterImage->p); i++)
{
fftImagesMulti(featMapImage->channels[i],filterImage->channels[i],
featMapImage->dimY, featMapImage->dimX, imagesMult);
......@@ -1460,4 +1460,4 @@ int nonMaximumSuppression(int numBoxes, const CvPoint *points,
free(is_suppressed);
return LATENT_SVM_OK;
}
\ No newline at end of file
}
......@@ -4,7 +4,6 @@
#include <assert.h>
#include <math.h>
IplImage * resize_opencv (IplImage * img, float scale){
IplImage * imgTmp;
......@@ -241,4 +240,5 @@ IplImage * resize_opencv (IplImage * img, float scale){
// free(dst);
// free(tmp);
// return imgTmp;
//}
\ No newline at end of file
//}
//
......@@ -91,7 +91,7 @@ int allocFFTImage(CvLSVMFftImage **image, int p, int dimX, int dimY)
int freeFFTImage(CvLSVMFftImage **image)
{
unsigned int i;
unsigned i;
if (*image == NULL) return LATENT_SVM_OK;
for (i = 0; i < (*image)->p; i++)
{
......@@ -101,4 +101,4 @@ int freeFFTImage(CvLSVMFftImage **image)
free((*image)->channels);
(*image)->channels = NULL;
return LATENT_SVM_OK;
}
\ No newline at end of file
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment