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

fixed several gcc 4.1 warnings

parent b80bdf32
......@@ -124,6 +124,7 @@ 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"
......
#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"
......
#ifndef _LSVM_FFT_H
#define _LSVM_FFT_H
#ifndef _LSVM_FFT_H_
#define _LSVM_FFT_H_
#include "_lsvm_types.h"
#include "_lsvm_error.h"
......
......@@ -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"
......
#ifndef _LSVM_ROUTINE_H
#define _LSVM_ROUTINE_H
#ifndef _LSVM_ROUTINE_H_
#define _LSVM_ROUTINE_H_
#include "_lsvm_types.h"
#include "_lsvm_error.h"
......
......@@ -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,
......
......@@ -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;
......
......@@ -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
*/
......
......@@ -803,6 +803,5 @@ int loadModel(
}
(*kPartFilters)[0] = comp[0];
//printf("end_parse\n");
return 0;
}
......@@ -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);
......
......@@ -4,7 +4,6 @@
#include <assert.h>
#include <math.h>
IplImage * resize_opencv (IplImage * img, float scale){
IplImage * imgTmp;
......@@ -242,3 +241,4 @@ IplImage * resize_opencv (IplImage * img, float scale){
// free(tmp);
// return imgTmp;
//}
//
......@@ -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++)
{
......
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