medusa.recon.mpipe._transforms#

A Python implementation of the C++ transform module in mediapipe by Rasmus Jones (Rassibassi), adapted from here and here.

The code in the module is used to estimate the local-to-world matrix of the Mediapipe reconstruction, i.e., how the current reconstruction is transformed relative to the canonical Mediapipe model (which is available here).

The class/functions are not documented as they are unlikely to be actually used by users of Medusa.

Module Contents#

class medusa.recon.mpipe._transforms.PCF(near=1, far=10000, frame_height=1920, frame_width=1080, fy=1080)[source]#
medusa.recon.mpipe._transforms.procrustes_landmark_basis = [(4, 0.070909939706326), (6, 0.032100144773722), (10, 0.008446550928056), (33,...#
medusa.recon.mpipe._transforms.landmark_weights#
medusa.recon.mpipe._transforms.image2world(screen_landmarks, pcf, v_world_ref)[source]#
medusa.recon.mpipe._transforms.project_xy(landmarks, pcf)[source]#
medusa.recon.mpipe._transforms.change_handedness(landmarks)[source]#
medusa.recon.mpipe._transforms.move_and_rescale_z(pcf, depth_offset, scale, landmarks)[source]#
medusa.recon.mpipe._transforms.unproject_xy(pcf, landmarks)[source]#
medusa.recon.mpipe._transforms.estimate_scale(landmarks, v_world_ref)[source]#
medusa.recon.mpipe._transforms.solve_weighted_orthogonal_problem(source_points, target_points, point_weights)[source]#
medusa.recon.mpipe._transforms.internal_solve_weighted_orthogonal_problem(sources, targets, sqrt_weights)[source]#
medusa.recon.mpipe._transforms.compute_optimal_rotation(design_matrix)[source]#
medusa.recon.mpipe._transforms.compute_optimal_scale(centered_weighted_sources, weighted_sources, weighted_targets, rotation)[source]#
medusa.recon.mpipe._transforms.combine_transform_matrix(r_and_s, t)[source]#