我试图在C ++类中调用以下方法,如下所示:
getMatches(m_queryDescriptors, m_matches); // at this point, m_queryDescriptors is populated as expected.
但是,当我逐步进入该方法时:
void PatternDetector::getMatches(const cv::Mat& queryDescriptors, std::vector<cv::DMatch>& matches)
{
matches.clear();
if (enableRatioTest)
{
m_matcher->knnMatch(queryDescriptors, m_knnMatches, 2); //<-- At this point,
// the queryDescriptors parameter seems to be
// re-initialised with default empty values.
这可能是一个简单的语法问题,还是更广泛的OpenCV问题?我是否错误地使用inputArray?
任何建议都非常感谢。
最佳, 别名