jutanke / mv3dpose

Implementation of the GCPR19 Paper "Iterative Greedy Matching for 3D Human Pose Tracking from Multiple Views"
MIT License
59 stars 5 forks source link

Regarding missing "w", "h", "rvec" for Testing on CMU Panoptic Sequences #8

Closed aviralchharia closed 1 year ago

aviralchharia commented 1 year ago

The readme mentions that rvec is a [1 x 3] vector. I tried testing the model on few sequences from the CMU Panoptic dataset. However, the calibration file of CMU Panoptic specifices rvec as a [3 x 3] matrix. Am I missing something here? Further what values of "w" and "h" did you use while testing the model on CMU Panoptic? The original Calibration file does not say anything.

{
  "K" : [ 3 x 3 ], /* intrinsic paramters */
  "rvec": [ 1 x 3 ], /* rotation vector */
  "tvec": [ 1 x 3 ], /* translation vector */
  "discCoef": [ 1 x 5 ], /* distortion coefficient */
  "w" : int(width),
  "h" : int(height)
}

The Camera Calibration file in CMU Panoptic:

{
    "name": "00_00",
    "type": "hd",
    "resolution": [1920,1080],
    "panel": 0,
    "node": 0,
    "K": [
        [1633.34,0,942.256],
        [0,1628.84,557.344],
        [0,0,1]
    ],
    "distCoef": [-0.220878,0.189272,7.79405e-05,0.000739643,0.0418043],
    "rvec": [
        [0.1201471256,0.03330941579,-0.9921971332],
        [-0.09157840245,0.9955474156,0.02233247834],
        [0.9885231734,0.08818064529,0.1226625834]
    ],
    "tvec": [
        [23.27031863],
        [126.5360495],
        [284.0106483]
    ]
}
jutanke commented 1 year ago

rvec has to be an axis-angle vector but your representation is a rotation matrix R. You will have to convert it to rvec as follows

import cv2

R = .... # your rotation matrix
rvec = cv2.Rodrigues(R)[0]  # use this rvec 

w and h are the width/height of the image. Just fill in whatever height/width the images have.

aviralchharia commented 1 year ago

Resolved, Thanks for helping!