Description
I would like to ask what version of OpenCV you are using. My computer system defaults to ros2humble, OpenCv4.8 version, but when I compile, I cannot find the aruco header file. After reinstalling OpenCv4.10 and its extension library OpenCv4ntrib, I encountered an error message from a function called 'create ArUcoBoard' inside CalibrationTarget. hpp, which displayed an error message
include/multisensor_calibration/calibration/../sensor_data_processing/../calibration_target/CalibrationTarget.hpp:163:42: required from here
/usr/include/c++/11/ext/new_allocator.h:162:11: error: no matching function for call to ‘cv::aruco::Board::Board(const std::vector<std::vector<cv::Point3_ > >&, const cv::Ptrcv::aruco::Dictionary&, const std::vector&)’
162 | { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/agx/multisensor_calibration/multisensor_calibration/src/calibration/../../include/multisensor_calibration/calibration/../sensor_data_processing/../calibration_target/CalibrationTarget.hpp:47,
Here is the created ArUcoBoard function that I have modified
void createGridBoard() {
//Create a 5x7 grid calibration board
cv::Size boardSize(5, 7); //Number of markers in the X/Y direction
float markerLength = 0.04f; //Marking edge length (meters)
float markerSeparation = 0.01f; //Mark spacing (meters)
cv::Ptrcv::aruco::GridBoard board =
cv::aruco::GridBoard::create(
boardSize.width,
boardSize.height,
markerLength,
markerSeparation,
pArucoDictionary
);
//Generate calibration board image
cv::Mat boardImage;
board->draw(cv::Size(800, 600), boardImage, 10, 1);
cv::imwrite("board.png", boardImage);
}