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

Calibration tutorial doesn't work. No board detected. #146

Open
vonaviv opened this issue Nov 27, 2024 · 0 comments
Open

Calibration tutorial doesn't work. No board detected. #146

vonaviv opened this issue Nov 27, 2024 · 0 comments

Comments

@vonaviv
Copy link

vonaviv commented Nov 27, 2024

Hey,

I have tried to run the tutorial, but no board could be detected in the videos from the google drive folder.

calib-charuco-camA-compressed.MOV
100%|████████████████████████████| 5274/5274 [00:08<00:00, 640.15it/s]
0 boards detected
calib-charuco-camB-compressed.MOV
100%|████████████████████████████| 5264/5264 [00:08<00:00, 637.49it/s]
0 boards detected
calib-charuco-camC-compressed.MOV
100%|████████████████████████████| 5265/5265 [00:07<00:00, 662.55it/s]
0 boards detected

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
Cell In[7], [line 18](vscode-notebook-cell:?execution_count=7&line=18)
     [15](vscode-notebook-cell:?execution_count=7&line=15) # the videos provided are fisheye, so we need the fisheye option
     [16](vscode-notebook-cell:?execution_count=7&line=16) cgroup = CameraGroup.from_names(cam_names, fisheye=True)
---> [18](vscode-notebook-cell:?execution_count=7&line=18) cgroup.calibrate_videos(vidnames, board)
     [19](vscode-notebook-cell:?execution_count=7&line=19) # cgroup.dump('calibration.toml')

File ~/anaconda3/envs/smg/lib/python3.11/site-packages/aniposelib/cameras.py:1650, in CameraGroup.calibrate_videos(self, videos, board, init_intrinsics, init_extrinsics, verbose, **kwargs)
   [1647](https://file+.vscode-resource.vscode-cdn.net/home/vivanov/Workspace/SMG/animal-tracking/3d/anipose/~/anaconda3/envs/smg/lib/python3.11/site-packages/aniposelib/cameras.py:1647) if init_extrinsics:
   [1648](https://file+.vscode-resource.vscode-cdn.net/home/vivanov/Workspace/SMG/animal-tracking/3d/anipose/~/anaconda3/envs/smg/lib/python3.11/site-packages/aniposelib/cameras.py:1648)     self.set_camera_sizes_videos(videos)
-> [1650](https://file+.vscode-resource.vscode-cdn.net/home/vivanov/Workspace/SMG/animal-tracking/3d/anipose/~/anaconda3/envs/smg/lib/python3.11/site-packages/aniposelib/cameras.py:1650) error = self.calibrate_rows(all_rows, board,
   [1651](https://file+.vscode-resource.vscode-cdn.net/home/vivanov/Workspace/SMG/animal-tracking/3d/anipose/~/anaconda3/envs/smg/lib/python3.11/site-packages/aniposelib/cameras.py:1651)                             init_intrinsics=init_intrinsics,
   [1652](https://file+.vscode-resource.vscode-cdn.net/home/vivanov/Workspace/SMG/animal-tracking/3d/anipose/~/anaconda3/envs/smg/lib/python3.11/site-packages/aniposelib/cameras.py:1652)                             init_extrinsics=init_extrinsics,
   [1653](https://file+.vscode-resource.vscode-cdn.net/home/vivanov/Workspace/SMG/animal-tracking/3d/anipose/~/anaconda3/envs/smg/lib/python3.11/site-packages/aniposelib/cameras.py:1653)                             verbose=verbose, **kwargs)
   [1654](https://file+.vscode-resource.vscode-cdn.net/home/vivanov/Workspace/SMG/animal-tracking/3d/anipose/~/anaconda3/envs/smg/lib/python3.11/site-packages/aniposelib/cameras.py:1654) return error, all_rows

File ~/anaconda3/envs/smg/lib/python3.11/site-packages/aniposelib/cameras.py:1592, in CameraGroup.calibrate_rows(self, all_rows, board, init_intrinsics, init_extrinsics, verbose, **kwargs)
   [1590](https://file+.vscode-resource.vscode-cdn.net/home/vivanov/Workspace/SMG/animal-tracking/3d/anipose/~/anaconda3/envs/smg/lib/python3.11/site-packages/aniposelib/cameras.py:1590) objp, imgp = board.get_all_calibration_points(rows)
   [1591](https://file+.vscode-resource.vscode-cdn.net/home/vivanov/Workspace/SMG/animal-tracking/3d/anipose/~/anaconda3/envs/smg/lib/python3.11/site-packages/aniposelib/cameras.py:1591) mixed = [(o, i) for (o, i) in zip(objp, imgp) if len(o) >= 9]
-> [1592](https://file+.vscode-resource.vscode-cdn.net/home/vivanov/Workspace/SMG/animal-tracking/3d/anipose/~/anaconda3/envs/smg/lib/python3.11/site-packages/aniposelib/cameras.py:1592) objp, imgp = zip(*mixed)
   [1593](https://file+.vscode-resource.vscode-cdn.net/home/vivanov/Workspace/SMG/animal-tracking/3d/anipose/~/anaconda3/envs/smg/lib/python3.11/site-packages/aniposelib/cameras.py:1593) matrix = cv2.initCameraMatrix2D(objp, imgp, tuple(size))
   [1594](https://file+.vscode-resource.vscode-cdn.net/home/vivanov/Workspace/SMG/animal-tracking/3d/anipose/~/anaconda3/envs/smg/lib/python3.11/site-packages/aniposelib/cameras.py:1594) camera.set_camera_matrix(matrix.copy())

ValueError: not enough values to unpack (expected 2, got 0)
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

1 participant