Python 实现动作视频 2D 关键点骨骼中心对齐
import numpy as np
定义 2D 关键点数组
key_points_a = np.array([[1,2], [3,4], [5,6], [7,8]]) key_points_b = np.array([[9,10], [11,12], [13,14], [15,16]])
计算每帧的骨骼中心
center_a = np.mean(key_points_a, axis=0) center_b = np.mean(key_points_b, axis=0)
计算偏移量
offset = center_b - center_a
将每帧的骨骼中心对齐
key_points_b_aligned = key_points_b + offset
原文地址: https://www.cveoy.top/t/topic/lmcP 著作权归作者所有。请勿转载和采集!