Merge pull request #16 from kirill-kornyakov/enable-travis

Enable travis and other fixes
pull/19/head
Alexandre Benoit 11 years ago
commit 9e5c28b88a
  1. 14
      .travis.yml
  2. 2
      modules/bioinspired/src/transientareassegmentationmodule.cpp
  3. 9
      modules/tracking/src/PFSolver.hpp

@ -0,0 +1,14 @@
language: cpp
compiler:
- gcc
- clang
before_script:
- cd ../
- git clone https://github.com/Itseez/opencv.git
- mkdir build-opencv
- cd build-opencv
- cmake -DOPENCV_EXTRA_MODULES_PATH=../opencv_contrib/modules ../opencv
script:
- make -j5
notifications:
email: false

@ -77,6 +77,8 @@
#include "precomp.hpp"
#include "basicretinafilter.hpp"
#include <sstream>
#define _SEGMENTATIONDEBUG //define SEGMENTATIONDEBUG to access more data/methods
namespace cv

@ -103,7 +103,10 @@ namespace cv{
_particles.row(i).copyTo(new_particles.row(num_particles));
}
}
Mat_<double> maxrow=_particles.row(std::max_element(_logweight.begin(),_logweight.end())-_logweight.begin());
//Mat_<double> maxrow=_particles.row(std::max_element(_logweight.begin(),_logweight.end())-_logweight.begin());
double max_element;
minMaxLoc(_logweight, 0, &max_element);
Mat_<double> maxrow=_particles.row(max_element);
for(;num_particles<new_particles.rows;num_particles++){
maxrow.copyTo(new_particles.row(num_particles));
}
@ -208,7 +211,9 @@ namespace cv{
}
void PFSolver::normalize(Mat_<double>& row){
double logsum=0.0;
double max=*(std::max_element(row.begin(),row.end()));
//double max=*(std::max_element(row.begin(),row.end()));
double max;
minMaxLoc(row, 0, &max);
row-=max;
for(int i=0;i<row.cols;i++){
logsum+=exp(row(0,i));

Loading…
Cancel
Save