我无法查看数组的组件

时间:2015-07-07 14:16:27

标签: arrays opencv struct components

我使用以下openCV变量:

std::vector<cv::DMatch> best_matches;
std::vector<cv::KeyPoint> tkeypoints[15];

当我按下&#34;。&#34;并尝试获取best_matches的组件,例如best_matches [i] .queryIdx,然后queryIdx在建议列表中正确显示。

但是,当我尝试获取tkeypoints的组件时,例如tkeypoints [i] .angle,我没有在建议列表中看到它,如果我尝试像那样运行它,我会收到错误。

为什么我无法访问第二个阵列中的组件?

tkeypoints tkeypoints

best_matches best_matches

1 个答案:

答案 0 :(得分:1)

既然是

std::vector<cv::KeyPoint> tkeypoints[15];

您应该像以下一样访问它:

tkeypoints[i][j].angle