1

Im using the following code to create and save the charuco board. When I print the charuco.png, the square length and marker length are not equal to the expected value of 0.05m and 0.03m respectively

d = cv2.aruco.getPredefinedDictionary(cv2.aruco.DICT_4X4_50)
charuco = cv2.aruco.CharucoBoard_create(3, 3, 0.05, 0.03, d)
height = 600
width = 600
img = charuco.draw((width, height))
cv2.imwrite("charuco.png", img)

Do I need to save the image as pdf/svg to maintain the dimensions of the charuco?

vacky
  • 277
  • 1
  • 4
  • 16
  • 1
    How big your printed image is depends completely on what your printer settings make out of a 600x600 pixel image. – Micka Dec 02 '22 at 18:33
  • @Micka But then, what is the use of creating a charuco board of specific square and marker length `charuco = cv2.aruco.CharucoBoard_create(3, 3, 0.05, 0.03, d)` – vacky Dec 02 '22 at 19:09
  • 1
    Never used charuco functions so far, but probably you need the marker sizes for your virtual 3D room which you use for calibration. There you need "object points" and those need dimensions ehich you define with those values. – Micka Dec 02 '22 at 21:20
  • 2
    Best way I know to print the pattern in some defined dimensions is to use the generator from https://calib.io/pages/camera-calibration-pattern-generator and print with printer settings that use the pdf dimensions instead of stretching to the paper size. – Micka Dec 02 '22 at 21:42
  • 2
    note that someone's been completely rewriting the aruco module of OpenCV. many things might have been broken compared to a year ago. if something doesn't work, hop into the issues of `opencv_contrib` and investigate. – Christoph Rackwitz Dec 03 '22 at 23:15

0 Answers0