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

cv2.initCameraMatrix2D initialisation #6

Open
oliver-batchelor opened this issue Dec 16, 2020 · 1 comment
Open

cv2.initCameraMatrix2D initialisation #6

oliver-batchelor opened this issue Dec 16, 2020 · 1 comment

Comments

@oliver-batchelor
Copy link

oliver-batchelor commented Dec 16, 2020

Something seems to be wrong with the parameters passed into cv2.initCameraMatrix2D... I suspect something not right with board.get_all_calibration_points

This is the output of cv2.calibrateCamera (focal length ~2250)

 [[2.24678790e+03 0.00000000e+00 1.02546166e+03]
 [0.00000000e+00 2.24602727e+03 7.64098182e+02]
 [0.00000000e+00 0.00000000e+00 1.00000000e+00]]

Own implementation passing the same raw points into cv2.initCameraMatrix2D (focal length ~2250):

[[2.24765913e+03 0.00000000e+00 9.99500000e+02]
 [0.00000000e+00 2.24765913e+03 7.49500000e+02]
 [0.00000000e+00 0.00000000e+00 1.00000000e+00]]

aniposelib initialisation from cv2.initCameraMatrix2D after board.get_all_calibration_points(rows)
(focal length ~121!!!)

[[121.30633838   0.         999.5       ]
 [  0.         121.30633838 749.5       ]
 [  0.           0.           1.        ]]

@oliver-batchelor oliver-batchelor changed the title cv2.init cv2.initCameraMatrix2D initialisation not right Dec 16, 2020
@oliver-batchelor oliver-batchelor changed the title cv2.initCameraMatrix2D initialisation not right cv2.initCameraMatrix2D initialisation Dec 16, 2020
@lambdaloop
Copy link
Owner

I realize this is very old, but if you're still available, do you have more detail on this?
Perhaps even the points that cause this issue?

I just spent some time double checking the cod and I can't find any clear issues. In the latest aniposelib, I'm getting reasonable values from initCameraMatrix2D...

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