perfanalytics / pose2sim

Markerless kinematics with any cameras — From 2D Pose estimation to 3D OpenSim motion
https://perfanalytics.github.io/pose2sim/
BSD 3-Clause "New" or "Revised" License
271 stars 50 forks source link

Calibration Issue #141

Closed drcsh7002 closed 2 weeks ago

drcsh7002 commented 4 weeks ago

when I set both the ['calibration']['calculate']['extrinsics']['board'] to False, the Pose2Sim will show error, ![Uploading 微信截图_20241029155258.png…]()

davidpagnon commented 4 weeks ago

Hi, sorry I'm away from my computer for a few days and I cannot see your screenshot. Can you upload it again?

drcsh7002 commented 4 weeks ago

ERROR

drcsh7002 commented 4 weeks ago

Thank you for replying to me. I am using your pose2sim to make a small tool that can process my own experimental data. This problem makes me unable to continue

davidpagnon commented 4 weeks ago

I'm not sure what you set to False, can you send me a screenshot of the calibration section of your Config.toml file?

drcsh7002 commented 4 weeks ago

I'm using the Pose2Sim 0.8.4 error2

davidpagnon commented 3 weeks ago

Hi, thanks for the screenshot. I still don't know what the problem is. Can you first update Pose2im with pip install pose2sim -U? You are telling me that setting show_reprojection_error to false leads to an error when you also set calibration_type to 'calculate' and extrinsics_method to "board". Do you get this error with extrinsics_method set to 'scene' (in the Demo trials for example)?

davidpagnon commented 3 weeks ago

Okay I could reproduce the error. Let me investigate it

davidpagnon commented 3 weeks ago

Okay, I found and fixed the error! I'll wait for a bit more edits to the code to push a new release, but in the meantime you can do pip show pose2sim to find your installation location, look for calibration.py, and edit line 694. Replace

                imgp, objp = findCorners(img_vid_files[0], extrinsics_corners_nb, objp=object_coords_3d, show=show_reprojection_error)

by:

                imgp = findCorners(img_vid_files[0], extrinsics_corners_nb, objp=object_coords_3d, show=show_reprojection_error)
                objp = object_coords_3d

Please tell me if it fixed it or not.

davidpagnon commented 2 weeks ago

I'm closing it as I believe the issue is fixed (will be added in a future release), but don't hesitate to reopen the issue if needed.