Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

aruco drawMarker

Hello,

I am trying to draw aruco markers but can't get it right. Is it possible that I have incorrectly linked the aruco.hpp files? How can I test for this? Here is the the code. The errors fall on the 3 and 4th lines.

cv::Mat markerImage;
cv::Ptr<aruco::DetectorParameters> parameters;
cv::Ptr<aruco::Dictionary> dictionary=aruco::getPredefinedDictionary(aruco::DICT_6X6_250);
cv::aruco::drawMarker(dictionary,1,200, markerImage, 1);
imwrite("test.png", markerImage);

The error

obj/Debug/main.o||In function `main':| /home/simon/OpenCV_ws/OpenCV_test/main.cpp|28|undefined reference to `cv::aruco::getPredefinedDictionary(cv::aruco::PREDEFINED_DICTIONARY_NAME)'| /home/simon/OpenCV_ws/OpenCV_test/main.cpp|29|undefined reference to `cv::aruco::drawMarker(cv::Ptr<cv::aruco::Dictionary> const&, int, int, cv::_OutputArray const&, int)'|

I tried https://stackoverflow.com/questions/36391657/aruco-tutorial-code-does-not-compile to fix the dictionary error but it didn't.

OpenCV: 3.4.3 using Code:blocks on Linux: 18.04

aruco drawMarker

Hello,

I am trying to draw aruco markers but can't get it right. Is it possible that I have incorrectly linked the aruco.hpp files? How can I test for this? Here is the the code. The errors fall on the 3 and 4th lines.

cv::Mat markerImage;
cv::Ptr<aruco::DetectorParameters> parameters;
cv::Ptr<aruco::Dictionary> dictionary=aruco::getPredefinedDictionary(aruco::DICT_6X6_250);
cv::aruco::drawMarker(dictionary,1,200, markerImage, 1);
imwrite("test.png", markerImage);

The error

obj/Debug/main.o||In function `main':| /home/simon/OpenCV_ws/OpenCV_test/main.cpp|28|undefined reference to `cv::aruco::getPredefinedDictionary(cv::aruco::PREDEFINED_DICTIONARY_NAME)'| /home/simon/OpenCV_ws/OpenCV_test/main.cpp|29|undefined reference to `cv::aruco::drawMarker(cv::Ptr<cv::aruco::Dictionary> const&, int, int, cv::_OutputArray const&, int)'|

I tried https://stackoverflow.com/questions/36391657/aruco-tutorial-code-does-not-compile to fix the dictionary error but it didn't.

OpenCV: 3.4.3 using Code:blocks on Linux: 18.04