Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

charuco board 0boards detected #23

Open
yichuan1998 opened this issue Sep 27, 2023 · 3 comments
Open

charuco board 0boards detected #23

yichuan1998 opened this issue Sep 27, 2023 · 3 comments

Comments

@yichuan1998
Copy link

yichuan1998 commented Sep 27, 2023

Hi, thanks for your great job. I followed the steps in aniposelib tutorial but got error: 0 boards detected. Could help me with that? Thanks!

My code:

from aniposelib.cameras import CameraGroup


vidnames = [['output0.avi'],
            ['output1.avi'],
            ['output2.avi']]

cam_names = ['A', 'B', 'C']

n_cams = len(vidnames)

board = CharucoBoard(7, 10,
                     square_length=25, # here, in mm but any unit works
                     marker_length=18.75,
                     marker_bits=4, dict_size=50)

cgroup = CameraGroup.from_names(cam_names, fisheye=False)
cgroup.calibrate_videos(vidnames, board)
cgroup.dump('calibration.toml')

Generate board and print it in A4 format:

from aniposelib.boards import CharucoBoard

board1 = CharucoBoard(7, 10,
                     square_length=25, # here, in mm but any unit works
                     marker_length=18.75,
                     marker_bits=4, dict_size=50)

img = board1.draw((2550,3300))
cv2.imwrite("img.jpg", img)

image

Sincerely

@lambdaloop
Copy link
Owner

Hello, I'm not sure if you're still having this issue, but it's hard to diagnose from this alone.
Could you post some sample videos to help debug? Thank you

@lambdaloop
Copy link
Owner

Could you try with the latest version of aniposelib (0.6.0 as of this writing) ?
Also, could you try with CharucoBoard(10, 7, ...) instead of CharucoBoard(7, 10, ...) to see if that works?

@yichuan1998
Copy link
Author

yichuan1998 commented Apr 30, 2024

Hi, I am still having this issue.
My code:

def cali():
    vidnames = [[r'D:\my_work\Only_test\video\0\video_152122079464.mp4'],
                [r'D:\my_work\Only_test\video\1\video_104422070017.mp4']]

    cam_names = ['A', 'B']

    n_cams = len(vidnames)

    board = CharucoBoard(4, 5,
                         square_length=14,  # here, in mm but any unit works
                         marker_length=10,
                         marker_bits=4, dict_size=50)

    # the videos provided are fisheye, so we need the fisheye option
    cgroup = CameraGroup.from_names(cam_names, fisheye=False)

    cgroup.calibrate_videos(vidnames, board)
    cgroup.dump('calibration.toml')

I'm sure the CharucoBoard parameters are right, here are my charuco board and the recorded videos.
微信图片_20240430161030
image
video_104422070017.zip

video_152122079464.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants