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

I encountered an issue while running Kalibr: "OpenCV Error: Assertion failed (isIdentity(expr))". How can I resolve this problem? #679

Open
12moon28 opened this issue Apr 16, 2024 · 0 comments

Comments

@12moon28
Copy link

My issue is as follows:
When I run the following code:
rosrun kalibr kalibr_calibrate_cameras --target ./cam0/april_6x6.yaml --models pinhole-radtan pinhole-radtan --topics /cam0/image_raw /cam1/image_raw --bag ./cam0/cam_april.bag
Output the following content:
OpenCV Error: Assertion failed (isIdentity(expr)) in _InputArray, file /home/kong/opencv/modules/core/src/matrix_expressions.cpp, line 1843
Traceback (most recent call last):
File "/home/kong/kalibr_ws/src/Kalibr/aslam_offline_calibration/kalibr/python/kalibr_calibrate_cameras", line 465, in
main()
File "/home/kong/kalibr_ws/src/Kalibr/aslam_offline_calibration/kalibr/python/kalibr_calibrate_cameras", line 188, in main
if not cam.initGeometryFromObservations(observations):
File "/home/kong/kalibr_ws/src/Kalibr/aslam_offline_calibration/kalibr/python/kalibr_camera_calibration/CameraCalibrator.py", line 69, in initGeometryFromObservations
success = kcc.calibrateIntrinsics(self, observations)
File "/home/kong/kalibr_ws/src/Kalibr/aslam_offline_calibration/kalibr/python/kalibr_camera_calibration/CameraIntializers.py", line 220, in calibrateIntrinsics
success, T_t_c = cam_geometry.geometry.estimateTransformation(obs)
RuntimeError: /home/kong/opencv/modules/core/src/matrix_expressions.cpp:1843: error: (-215) isIdentity(expr) in function _InputArray

OpenCV Error: Assertion failed (tlsSlots.size() > slotIdx) in releaseSlot, file /build/opencv-L2vuMj/opencv-3.2.0+dfsg/modules/core/src/system.cpp, line 1092
terminate called after throwing an instance of 'cv::Exception'
what(): /build/opencv-L2vuMj/opencv-3.2.0+dfsg/modules/core/src/system.cpp:1092: error: (-215) tlsSlots.size() > slotIdx in function releaseSlot

According to the information I found online, the issue might be caused by incompatible versions of OpenCV (I'm using 3.4.20 while ROS is installed with 3.2). However, even after modifying the corresponding parameters in the files to match version 3.4.20, the problem persists.

thankyou!

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