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

only size-1 arrays can be converted to Python scalars error #3

Open
K-Meech opened this issue Sep 8, 2023 · 0 comments
Open

only size-1 arrays can be converted to Python scalars error #3

K-Meech opened this issue Sep 8, 2023 · 0 comments

Comments

@K-Meech
Copy link
Owner

K-Meech commented Sep 8, 2023

Sometimes when 'Solve Camera Pose' is clicked, the following error occurs from openCV:

  File "C:\Users\kimbe\Documents\Repos\Blender-dev\addons\image-matcher\pnp.py", line 439, in execute
    return solve_pnp(*get_scene_info(self, context))
  File "C:\Users\kimbe\Documents\Repos\Blender-dev\addons\image-matcher\pnp.py", line 226, in solve_pnp
    ("Reprojection Error: %.2f" % error) if ret else "solvePnP failed!"
TypeError: only size-1 arrays can be converted to Python scalars

This tends to happen when the point pairs are poorly placed leading to a bad match. It seems this results in the returned reprojection error being of length 2 (rather than 1)

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