Skip to content

Commit

Permalink
Merge pull request #239 from ncantrell/patch-2
Browse files Browse the repository at this point in the history
Fix for a compile error
  • Loading branch information
ildoonet authored Jun 28, 2018
2 parents 5369d69 + 597df59 commit d884cd1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tf_pose/pafprocess/pafprocess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ using namespace std;
vector<vector<float> > subset;
vector<Peak> peak_infos_line;

int round(float v);
int roundpaf(float v);
vector<VectorXY> get_paf_vectors(float *pafmap, const int& ch_id1, const int& ch_id2, int& f2, int& f3, Peak& peak1, Peak& peak2);
bool comp_candidate(ConnectionCandidate a, ConnectionCandidate b);

Expand Down Expand Up @@ -220,8 +220,8 @@ vector<VectorXY> get_paf_vectors(float *pafmap, const int& ch_id1, const int& ch
const float STEP_Y = (peak2.y - peak1.y) / float(STEP_PAF);

for (int i = 0; i < STEP_PAF; i ++) {
int location_x = round(peak1.x + i * STEP_X);
int location_y = round(peak1.y + i * STEP_Y);
int location_x = roundpaf(peak1.x + i * STEP_X);
int location_y = roundpaf(peak1.y + i * STEP_Y);

VectorXY v;
v.x = PAF(location_y, location_x, ch_id1);
Expand All @@ -232,10 +232,10 @@ vector<VectorXY> get_paf_vectors(float *pafmap, const int& ch_id1, const int& ch
return paf_vectors;
}

int round(float v) {
int roundpaf(float v) {
return (int) (v + 0.5);
}

bool comp_candidate(ConnectionCandidate a, ConnectionCandidate b) {
return a.score > b.score;
}
}

0 comments on commit d884cd1

Please sign in to comment.