Skip to content

Commit 9e5c28b

Browse files
committed
Merge pull request #16 from kirill-kornyakov/enable-travis
Enable travis and other fixes
2 parents 881b115 + 9ec2805 commit 9e5c28b

File tree

3 files changed

+23
-2
lines changed

3 files changed

+23
-2
lines changed

.travis.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
language: cpp
2+
compiler:
3+
- gcc
4+
- clang
5+
before_script:
6+
- cd ../
7+
- git clone https://github.com/Itseez/opencv.git
8+
- mkdir build-opencv
9+
- cd build-opencv
10+
- cmake -DOPENCV_EXTRA_MODULES_PATH=../opencv_contrib/modules ../opencv
11+
script:
12+
- make -j5
13+
notifications:
14+
email: false

modules/bioinspired/src/transientareassegmentationmodule.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@
7777
#include "precomp.hpp"
7878
#include "basicretinafilter.hpp"
7979

80+
#include <sstream>
81+
8082
#define _SEGMENTATIONDEBUG //define SEGMENTATIONDEBUG to access more data/methods
8183

8284
namespace cv

modules/tracking/src/PFSolver.hpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,10 @@ namespace cv{
103103
_particles.row(i).copyTo(new_particles.row(num_particles));
104104
}
105105
}
106-
Mat_<double> maxrow=_particles.row(std::max_element(_logweight.begin(),_logweight.end())-_logweight.begin());
106+
//Mat_<double> maxrow=_particles.row(std::max_element(_logweight.begin(),_logweight.end())-_logweight.begin());
107+
double max_element;
108+
minMaxLoc(_logweight, 0, &max_element);
109+
Mat_<double> maxrow=_particles.row(max_element);
107110
for(;num_particles<new_particles.rows;num_particles++){
108111
maxrow.copyTo(new_particles.row(num_particles));
109112
}
@@ -208,7 +211,9 @@ namespace cv{
208211
}
209212
void PFSolver::normalize(Mat_<double>& row){
210213
double logsum=0.0;
211-
double max=*(std::max_element(row.begin(),row.end()));
214+
//double max=*(std::max_element(row.begin(),row.end()));
215+
double max;
216+
minMaxLoc(row, 0, &max);
212217
row-=max;
213218
for(int i=0;i<row.cols;i++){
214219
logsum+=exp(row(0,i));

0 commit comments

Comments
 (0)