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 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/3... to fix the dictionary error but it didn't.
OpenCV: 3.4.3 using Code:blocks on Linux: 18.04
The full code https://pastebin.com/zN9iFmb4
you have to correctly link libs , not header files here (
-lopencv_aruco
)