I recently overtook an aruco tag detection project from a coworker and I am having trouble compiling it. The actual developer of this algorithm claims that it compiles on her PC so I believe I have a setup issue. I tested the OpenCV installation by writing a simple image processing code and it worked fine however I am receiving 3 errors related the aruco library in particular. The errors are as follows:
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;
I checked the cv::aruco::DetectorParameters Struct Reference and cornerRefinementMethod
is actually a member of cv::aruco::DetectorParameters
.
The code that I am trying to compile is a modified version of the detect_markers.cpp code that can be found here.