Handle calibration files with extra cameras#207
Handle calibration files with extra cameras#207ErwanBeurienne wants to merge 2 commits intoperfanalytics:mainfrom
Conversation
|
Thanks, Erwan! |
|
I pushed a follow-up fix: the previous approach could mismatch camera parameters when the calib file contains non-contiguous camera IDs (e.g. cam1, cam2, cam4, cam6). The filtering is now done by camera name (from calib file) and json pose folder directly in retrieve_calib_params() and computeP(). adapt_P_and_calib_params() was removed. |
|
Hi Erwan, Let me know if I misunderstood anything:
This looks good to me, however could you address the couple of questions I asked in the review? Thanks, and I wish you a great new year's eve! |
ErwanBeurienne
left a comment
There was a problem hiding this comment.
To handle misalignment between calibration files and pose folders (e.g., non-contiguous or missing camera IDs), the following changes were implemented:
- In common.py, the optional parameter json_pose_dirs_names was added to retrieve_calib_params and computeP, and used in personAssociation.py and triangulation.py.
- If the parameter is not provided, the behavior remains unchanged. When used, it associates cameras by name between calibration files and _json pose folders.
|
Hi David! Your understanding is correct. I addressed your questions in the PR comments. If "the review" refers to a specific section or format I missed, let me know where to add or move the information. |
|
And of course, I wish you a Happy New Year! |
|
Lol no problem! I truly appreciate your small iterative pull requests, I'm sorry it takes time to review them but I'm not forgetting them! |
|
Hi Erwan, no offense but your answer here is a pure reformulation of my question :) #207 (review) The questions in my review are just a few comments above, under this section: |
Added adapt_P_and_calib_params to handle cases where the number of cameras in calibration files exceeds the number of pose folders, issuing warnings and adapting parameters accordingly. Updated personAssociation.py and triangulation.py to use this logic and provide clearer logging messages.
fix: avoid calib/pose camera mismatch with non-contiguous IDs The previous index-based alignment could assign wrong calibration parameters when cameras in calib file are non-contiguous (e.g. cam1, cam2, cam4, cam6). Remove adapt_P_and_calib_params. Handle pose-dir filtering directly in retrieve_calib_params() and computeP() via json_pose_dirs_names, and update personAssociation.py and triangulation.py accordingly.
|
Hello David, Yes, I am currently using the pose2sim programme with my data and I am encountering a few bugs/problems that I am trying to fix and report correctly! Regarding the questions you ask in the review, I am sorry, but I do not see any part of the review where I can answer questions. In one place, I can click on "View reviewed changes”, as I can see on your screenshot, but that only takes me to the code changes I've made and I don't see any questions. I also don't see “davidpagnon started a review”, so I'm sorry, but I really don't know what to do... |
|
Have a look there: https://github.com/perfanalytics/pose2sim/pull/207/changes
|
|
Also, can you tell me if my understanding is correct here? #207 (comment) |
Hello !
In this pull request, I add a new helper function, adapt_P_and_calib_params(), to handle cases where the number of cameras defined in the calibration files exceeds the number of pose folders available. This function issues clear warnings and automatically adapts the calibration parameters so that only the relevant cameras are used.
The main changes are:
This should make the pipeline more robust to inconsistent calibration/pose configurations while preserving existing behavior when the inputs are consistent.