how do I generate a ChAruco board calibration? I tried to find an existing board in Google Search but I couldn't find it.
Thanks, Carlos
how do I generate a ChAruco board calibration? I tried to find an existing board in Google Search but I couldn't find it.
Thanks, Carlos
Use cv::aruco::CharucoBoard::draw
as described in the CharucoBoard Class Reference to create an image and then imwrite
to write the image to a file.
You can generate ChArUco patterns and save them as vector graphics (PDF) here: https://calib.io/pages/camera-calibration-pattern-generator That way you get the best accuracy in the print possible.
There will be a built-in pattern_generator in opencv_contrib that place at folder: opencv_contrib/modules/aruco/misc/pattern_generator/
You can use it to generate your marker as vector graphics and print it out.
https://github.com/opencv/opencv_contrib/pull/2250
PS. LOL, I put the tool to official helper scripts/tool, now you guys have no reason to delete my answer XDDD....
Here is a C++ example on how to create and save a Charuco board as an image:
#include <opencv2/aruco/charuco.hpp>
#include <opencv2/imgcodecs.hpp>
int main(void)
{
cv::Mat m(700, 500, CV_8UC1);
cv::Ptr< cv::aruco::Dictionary > dict = cv::aruco::getPredefinedDictionary(cv::aruco::DICT_4X4_50);
cv::Ptr< cv::aruco::CharucoBoard > charuco = cv::aruco::CharucoBoard::create(7, 5, 0.04, 0.02, dict);
charuco->draw(cv::Size(700, 500), m, 0, 1);
cv::imwrite("board.png", m);
return 0;
}
I have been generating charuco from https://www.deepen.ai/calibrate. They have the option to save it as pdf or png from there. It has a target generator which generates charuco boards.