Skip to content

a question about function CalcFeatureValues  #35

@xiexiexxs

Description

@xiexiexxs

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;
}
`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions