Attempt to fix Caliscope support

This commit is contained in:
davidpagnon 2024-10-07 23:55:21 +02:00
parent 822059fb5f
commit a92f77f378
3 changed files with 7 additions and 7 deletions

View File

@ -297,7 +297,10 @@ def recap_triangulate(config_dict, error, nb_cams_excluded, keypoints_names, cam
calib_dir = [os.path.join(session_dir, c) for c in os.listdir(session_dir) if os.path.isdir(os.path.join(session_dir, c)) and 'calib' in c.lower()][0]
calib_file = glob.glob(os.path.join(calib_dir, '*.toml'))[0] # lastly created calibration file
calib = toml.load(calib_file)
cam_names = np.array([calib[c].get('name') for c in list(calib.keys())])
cal_keys = [c for c in calib.keys()
if c not in ['metadata', 'capture_volume', 'charuco', 'checkerboard']
and isinstance(calib[c],dict)]
cam_names = np.array([calib[c].get('name') if calib[c].get('name') else c for c in cal_keys])
cam_names = cam_names[list(cam_excluded_count[0].keys())]
error_threshold_triangulation = config_dict.get('triangulation').get('reproj_error_threshold_triangulation')
likelihood_threshold = config_dict.get('triangulation').get('likelihood_threshold_triangulation')
@ -310,9 +313,6 @@ def recap_triangulate(config_dict, error, nb_cams_excluded, keypoints_names, cam
undistort_points = config_dict.get('triangulation').get('undistort_points')
# Recap
cal_keys = [c for c in calib.keys()
if c not in ['metadata', 'capture_volume', 'charuco', 'checkerboard']
and isinstance(calib[c],dict)]
calib_cam1 = calib[cal_keys[0]]
fm = calib_cam1['matrix'][0][0]
Dm = euclidean_distance(calib_cam1['translation'], [0,0,0])

View File

@ -80,7 +80,7 @@ Pose2Sim stands for "OpenPose to OpenSim", as it originally used *OpenPose* inpu
5. [With Mediapipe BlazePose (legacy)](#with-mediapipe-blazepose-legacy)
6. [With AlphaPose (legacy)](#with-alphapose-legacy)
4. [Camera calibration](#camera-calibration)
1. [Convert from Qualisys, Optitrack, Vicon, OpenCap, EasyMocap, or bioCV](#convert-from-qualisys-optitrack-vicon-opencap-easymocap-or-biocv)
1. [Convert from Caliscope, AniPose, FreeMocap, Qualisys, Optitrack, Vicon, OpenCap, EasyMocap, or bioCV](#convert-from-caliscope-anipose-freemocap-qualisys-optitrack-vicon-opencap-easymocap-or-biocv)
2. [Calculate from scratch](#calculate-from-scratch)
5. [Synchronizing, Associatiating, Triangulating, Filtering](#synchronizing-associating-triangulating-filtering)
1. [Synchronization](#synchronization)
@ -444,7 +444,7 @@ Output file:
<img src="Content/CalibFile.png" width="760">
### Convert from Qualisys, Optitrack, Vicon, OpenCap, EasyMocap, or bioCV
### Convert from Caliscope, AniPose, FreeMocap, Qualisys, Optitrack, Vicon, OpenCap, EasyMocap, or bioCV
If you already have a calibration file, set `calibration_type` type to `convert` in your [Config.toml](https://github.com/perfanalytics/pose2sim/blob/main/Pose2Sim/Empty_project/User/Config.toml) file.
- **From [Caliscope](https://mprib.github.io/caliscope/), [AniPose](https://github.com/lambdaloop/anipose) or [FreeMocap](https://github.com/freemocap/freemocap):**

View File

@ -1,6 +1,6 @@
[metadata]
name = pose2sim
version = 0.10.2
version = 0.10.3
author = David Pagnon
author_email = contact@david-pagnon.com
description = Perform a markerless kinematic analysis from multiple calibrated views as a unified workflow from an OpenPose input to an OpenSim result.