错误:“结构cv :: aruco :: DetectorParameters”没有名为“ cornerRefinementMethod”的成员

时间:2019-05-26 23:35:53

标签: c++ opencv aruco

我最近从同事那里接过一个aruco标签检测项目,但在编译时遇到了麻烦。该算法的实际开发者声称它可以在她的PC上编译,因此我认为我遇到了安装问题。我通过编写一个简单的图像处理代码测试了OpenCV安装,但工作正常,但是我收到了与aruco库有关的3个错误。错误如下:

detect_markers.cpp: In function ‘bool readDetectorParameters(std::__cxx11::string, cv::Ptr<cv::aruco::DetectorParameters>&)’:
detect_markers.cpp:128:45: error: ‘struct cv::aruco::DetectorParameters’ has no member named ‘cornerRefinementMethod’
fs["cornerRefinementMethod"] >> params->cornerRefinementMethod;

detect_markers.cpp: In function ‘int main(int, char**)’:
detect_markers.cpp:167:21: error: ‘struct cv::aruco::DetectorParameters’ has no member named ‘cornerRefinementMethod’
detectorParams->cornerRefinementMethod = aruco::CORNER_REFINE_SUBPIX; // do corner refinement in markers

detect_markers.cpp:167:46: error: ‘CORNER_REFINE_SUBPIX’ is not a member of ‘cv::aruco’
detectorParams->cornerRefinementMethod = aruco::CORNER_REFINE_SUBPIX; 

我检查了cv::aruco::DetectorParameters Struct Reference,而cornerRefinementMethod实际上是cv::aruco::DetectorParameters的成员。

我尝试编译的代码是here上的detect_markers.cpp代码的修改版本。

0 个答案:

没有答案