Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

a question about function CalcFeatureValues #35

Open
xiexiexxs opened this issue Jan 2, 2019 · 0 comments
Open

a question about function CalcFeatureValues #35

xiexiexxs opened this issue Jan 2, 2019 · 0 comments

Comments

@xiexiexxs
Copy link

Hi,thanks very much for your open source code. I've learned a lot from it.
However,i have some question with this line features[i][j] = feature.CalcFeatureValue(img, img_half, img_quarter, shape, stp_mc[i]);
in function CalcFeatureValues in data.cpp LINE 168.
As I understand it, features[i][j] means the i_th feature of the j_th image, stp_mc means transformation from meanShape to currentShape. So the stp_mc used here should be stp_mc[idx[j]] , am i right?
Following is the original code.
`
Mat_ DataSet::CalcFeatureValues(const vector& feature_pool,
const vector& idx) const {
const int n = feature_pool.size();
const int m = idx.size();

if (m == 0) {
return Mat_();
}

Mat_ features(n, m);

#pragma omp parallel for
for (int j = 0; j < m; j++) {
const Mat& img = imgs[idx[j]];
const Mat& img_half = imgs_half[idx[j]];
const Mat& img_quarter = imgs_quarter[idx[j]];
const Mat_& shape = current_shapes[idx[j]];

for (int i = 0; i < n; i++) {
  const Feature& feature = feature_pool[i];
  features[i][j] = feature.CalcFeatureValue(img, img_half, img_quarter, shape, stp_mc[i]);
}

}
return features;
}
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant