Open luyr opened 2 years ago
Hi @luyr ,
Check out this code and codes around here.
Project the output meshes with the new scale and translation, then you will get the pixel location of root joint in the original image space.
Or check out below snippet to just catch the concept though it is assuming a perspective camera. (The current code in this repo assumes a weak perspective camera)
# bbox: (x_min, y_min, w, h)
# cfg.input_img_shape: (h, w)
root_cam = out['root_cam']
princpt = [bbox[0] + bbox[2] / 2, bbox[1] + bbox[3] / 2]
focal = [cfg.focal[0], cfg.focal[1]]
focal[0] = focal[0] * (bbox[2] / cfg.input_img_shape[1])
focal[1] = focal[1] * (bbox[3] / cfg.input_img_shape[0])
Is there any way to output the root joint location in pixel space? THX!