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

change the layout of feat_vec to C++ style #59

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions eco/feature_operator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ vector<cv::Mat> init_projection_matrix(const ECO_FEATS &init_sample,
float mean = cv::mean(init_sample[i][j])[0]; // get the mean value of the mat;
for (size_t r = 0; r < (size_t)init_sample[i][j].rows; r++)
for (size_t c = 0; c < (size_t)init_sample[i][j].cols; c++)
feat_vec.at<float>(c * init_sample[i][j].rows + r, j) = init_sample[i][j].at<float>(r, c) - mean;
feat_vec.at<float>(r * init_sample[i][j].cols + c, j) = init_sample[i][j].at<float>(r, c) - mean;
}
result.push_back(feat_vec);
}
Expand Down Expand Up @@ -334,4 +334,4 @@ ECO_FEATS FeatureDotDivide(const ECO_FEATS &a, const ECO_FEATS &b)
}
return res;
}
} // namespace eco
} // namespace eco