I am trying to use the camera pose from opencv. So I'm following this series of tutorial which leads me to include these :
#include <opencv2/core.hpp>
#include <opencv2/imgcodecs.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/highgui.hpp>
#include <opencv2/aruco.hpp>
#include <opencv2/calib3d.hpp>
Everything works fine but the aruco one. First it wasn't in my package of opencv (ver 4.3) so I had to go look for it and put it in my opencv include directory (I added the aruco.hpp
as well as the aruco folder containing charuco.hpp
and dictionary.hpp
). I searched for the opencv_aruco310d.lib
file that I added in my opencv lib directory (x64).
I installed opencv using this tutorial
But when I try to run my code, it gives me this error:
Error LNK2019 external symbol unresolved "void __cdecl cv::aruco::drawMarker(struct cv::Ptr const &,int,int,class cv::debug_build_guard::_OutputArray const &,int)" (?drawMarker@aruco@cv@@YAXAEBU?$Ptr@VDictionary@aruco@cv@@@2@HHAEBV_OutputArray@debug_build_guard@2@H@Z) referenced in the function "void __cdecl createArucoMarkers(void)" (?createArucoMarkers@@YAXXZ) ConsoleApplication1
It seems to be related to this line of code:
aruco::drawMarker(markerDictionary, i, 500, outputMarker, 1);
I understand that I have a problem of version here, I think I saw somewhere that aruco was not supported after opencv3 so I tried with opencv3.4 but it still didn't work.
How can I solve my issue? Thank you in advance.