Ask Your Question
0

How to retrieve Object Points of CharUco Board

asked 2019-07-16 00:17:10 -0500

Hello,

When detecting corners for a charuco board, I follow:

```

    image = <IMAGE OF BOARD>

    dictionary = cv2.aruco.getPredefinedDictionary(cv2.aruco.DICT_5X5_1000)
    board = cv2.aruco.CharucoBoard_create(
        num_squares_x, num_squares_y, square_length, marker_length, dictionary)
    corners, ids, _ = cv2.aruco.detectMarkers(img, dictionary)

    if ids is not None and ids.size > 0:
          num_corners, charuco_corners, charuco_ids = cv2.aruco.interpolateCornersCharuco(
                corners, ids, img, board)

```

After getting a calibration, its easy to find corresponding object_points and image_points to pass into something like solvePnP when using the ArUco corners. I.e.

```

    obj_pts, img_pts = cv2.aruco.getBoardObjectAndImagePoints(
          board,
          corners,
          ids
    )

```

However I am having a hard time finding the corresponding charuco_object_pts that match with charuco_corners. There doesn't seem to be a function in cv2.aruco that recovers this for you. Is there a standard convention that specifies what charuco_object_pts are.

I know for normal checkerboards such object points could be recovered like ```

obj_pattern = np.zeros((num_squares_y * num_squares_x, 3), np.float32)
obj_pattern[:, :2] = np.mgrid[0:num_squares_y, 0:num_squares_x].T.reshape(-1, 2)

```
But this does not work for chaUrco Board from my experiments. Any help would be greatly appreciated!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2019-11-10 05:30:37 -0500

wyc gravatar image

Hi, did you mange to find out solution to this? I am having trouble to convert charuco obj and img points for stereo calibration

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-07-16 00:15:30 -0500

Seen: 64 times

Last updated: Jul 16 '19