Skip to content

Commit

Permalink
fix bugs in joint and tree
Browse files Browse the repository at this point in the history
  • Loading branch information
prayshe committed Jul 21, 2015
1 parent 60794f9 commit 285e684
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
6 changes: 3 additions & 3 deletions Joint/joint.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include <vector>
#include <string>
#include "tree.h"
#include "sample.h"

using namespace std;
using namespace cv;
Expand All @@ -19,8 +19,8 @@ struct GlobalParams
// total stages
static int stages;

static double radius[10];
static int numFeats[10];
static double radius[5];
static int numFeats[5];
static int depth;
static int numTrees;

Expand Down
3 changes: 3 additions & 0 deletions Joint/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@

int GlobalParams::n_landmark = 68;
int GlobalParams::n_initial = 5;
int GlobalParams::depth = 5;
double GlobalParams::radius[5] = { 0.4, 0.3, 0.2, 0.15, 0.12 };
int GlobalParams::numFeats[5] = { 500, 500, 500, 300, 300 };

int main() {
Joint joint;
Expand Down
16 changes: 8 additions & 8 deletions Joint/tree.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,18 @@ class Tree

void SplitNode(
const spliteType &sType,
const vector<Sample> &samples,
const Mat_<double> &meanShape,
const vector<int> &sample_idx,
const std::vector<Sample> &samples,
const cv::Mat_<double> &meanShape,
const std::vector<int> &sample_idx,
// output
double &threshold,
Point2d* feat,
vector<int> &lcID,
vector<int> &rcID
cv::Point2d* feat,
std::vector<int> &lcID,
std::vector<int> &rcID
);

void Train(vector<Sample> &samples,
const Mat_<double> &meanShape,
void Train(std::vector<Sample> &samples,
const cv::Mat_<double> &meanShape,
int stages,
int landmarkID);
};
Expand Down

0 comments on commit 285e684

Please sign in to comment.