10

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

Carlos Chacon
  • 241
  • 1
  • 4
  • 17

6 Answers6

10

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.

SSteve
  • 10,550
  • 5
  • 46
  • 72
9

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.

Jakob
  • 151
  • 1
  • 3
2

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....

簡嘉信
  • 21
  • 2
1

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;
}
wedesoft
  • 2,781
  • 28
  • 25
0

Charuco boards (svg format) can be generated here: MarkrMakr

haronaut
  • 409
  • 3
  • 16
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.

crazysra
  • 111
  • 10