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

Can't evaluate accuracy of a calibration #43

Open
jessicalfr opened this issue Dec 14, 2022 · 4 comments
Open

Can't evaluate accuracy of a calibration #43

jessicalfr opened this issue Dec 14, 2022 · 4 comments

Comments

@jessicalfr
Copy link

I performed the calibration of 3 câmeras without any problems, and now I'm trying to evaluate the accuracy of the calibration with a new set of images. Initially I followed the instructions setting the input_path as alt (the folder with new set of images), but I got the following error:

$ multical calibrate --boards charuco_16x22.yaml --input_path alt --calibration calibration.json --fix_intrinsic --fix_camera_poses
usage: multical [-h] {calibrate,intrinsic,boards,vis} ...
multical: error: unrecognized arguments: --input_path alt

So I figured the argument was wrong, once that input_path is not a listed argument: in $ multical calibrate --help.

So I tried using this command multical calibrate --boards charuco_16x22.yaml --image_path alt --calibration calibration.json --fix_intrinsic --fix_camera_poses which gave me a set of errors like these (one for each image):

Traceback (most recent call last):
  File "/home/jessica/.local/lib/python3.10/site-packages/multical/threading.py", line 21, in __call__
    result = self.__callable(*args, **kwargs)
  File "/home/jessica/.local/lib/python3.10/site-packages/multical/image/detect.py", line 14, in load_image
    assert path.isfile(filename), f"load_image: file {filename} does not exist"
AssertionError: load_image: file /alt/alt/cam0/image01.jpg does not exist

The function is looking for the images in the alt/alt/ folder, but I specified alt. In the error above, the right path would be alt/cam0/image01.jpg. It looks like a bug to me.

@jessicalfr
Copy link
Author

jessicalfr commented Dec 14, 2022

I'm using multical 0.2.2, opencv-python 4.6.0.66, and python 3.10.6 in Ubuntu 22.04.1 LTS.

@huntkao
Copy link

huntkao commented Dec 20, 2022

Does it work by simply making symbol link to alt/alt/ folder?

@jessicalfr
Copy link
Author

When I move the images to the alt/alt/folder, I get a different error:

$ multical calibrate --boards charuco_16x22.yaml --image_path alt --calibration calibration.json --fix_intrinsic --fix_camera_poses
INFO - Using boards:
INFO - charuco_16x22 CharucoBoard {type='charuco', aruco_dict='4X4_1000', aruco_offset=0, size=(16, 22), num_ids=176, marker_length=0.0085, square_length=0.011, aruco_params={}}
Traceback (most recent call last):
  File "/home/jessica/.local/bin/multical", line 8, in <module>
    sys.exit(cli())
  File "/home/jessica/.local/lib/python3.10/site-packages/multical/app/multical.py", line 28, in cli
    run_with(Multical)
  File "/home/jessica/.local/lib/python3.10/site-packages/multical/config/arguments.py", line 73, in run_with
    return program.app.execute()
  File "/home/jessica/.local/lib/python3.10/site-packages/multical/app/multical.py", line 24, in execute
    return self.command.execute()
  File "/home/jessica/.local/lib/python3.10/site-packages/multical/app/calibrate.py", line 21, in execute
    calibrate(self)
  File "/home/jessica/.local/lib/python3.10/site-packages/multical/app/calibrate.py", line 34, in calibrate
    camera_images = find_camera_images(args.paths.image_path, 
  File "/home/jessica/.local/lib/python3.10/site-packages/multical/config/runtime.py", line 39, in find_camera_images
    image_names, filenames = find_images(camera_paths, extensions=extensions)
  File "/home/jessica/.local/lib/python3.10/site-packages/multical/image/find.py", line 44, in find_images_matching
    image_names = find_matching_files(camera_dirs, extensions)
  File "/home/jessica/.local/lib/python3.10/site-packages/multical/image/find.py", line 22, in find_matching_files
    return natsorted(set.intersection(*[set(files) for files in camera_files.values()]))
TypeError: unbound method set.intersection() needs an argument

@Mabroukiimen
Copy link

Hello Jessica, can you please tell me what's exactly the command that you wrote to perform calibration ? this is the way I write the command: multical calibrate --cameras C11139,C11140,C11141,C11458,C11459,C11461,C11462,C11463
with : C11139,C11140,C11141,C11458,C11459,C11461,C11462,C11463 are the name of my cameras but it gives me this error: ValueError: mutable default <class 'multical.config.arguments.PathOpts'> for field paths is not allowed: use default_factory

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

3 participants