Euler angles for Body
This commit is contained in:
@@ -13,6 +13,10 @@ logging.basicConfig(filename="hpe_mp_class.log", level=logging.INFO, format=FORM
|
||||
logger = logging.getLogger("hpe_mp_class_logger")
|
||||
|
||||
from ModelUE4 import *
|
||||
from ModelUE4_apose import bodyaposelocal
|
||||
from ModelUE4_apose import bodyaposeworld
|
||||
from ModelUE4_old import bodyconvert
|
||||
from ModelUE4_old import bodyconvertlocal
|
||||
|
||||
class hpe_mp_class():
|
||||
|
||||
@@ -172,25 +176,27 @@ class hpe_mp_class():
|
||||
if world:
|
||||
bodyaposeworld(data)
|
||||
if self.holistic_use:
|
||||
# poseslms = {}
|
||||
# maxy = 0
|
||||
# if self.results_hol.pose_landmarks:
|
||||
# for id, lm in enumerate(self.results_hol.pose_landmarks.landmark):
|
||||
# poseslms[id] = lm
|
||||
# if lm.y > maxy:
|
||||
# maxy = lm.y
|
||||
#
|
||||
# if old_world:
|
||||
# bodyconvert(poseslms, data, self.coef, maxy)
|
||||
# else:
|
||||
# bodyconvertwithrot(poseslms, data, self.coef, maxy)
|
||||
#
|
||||
poseslms = {}
|
||||
maxy = 0
|
||||
if self.results_hol.pose_landmarks:
|
||||
for id, lm in enumerate(self.results_hol.pose_landmarks.landmark):
|
||||
poseslms[id] = lm
|
||||
if lm.y > maxy:
|
||||
maxy = lm.y
|
||||
|
||||
bodyeuler(poseslms, data, self.coef)
|
||||
|
||||
# if old_world:
|
||||
# bodyconvert(poseslms, data, self.coef, maxy)
|
||||
# else:
|
||||
# bodyconvertwithrot(poseslms, data, self.coef, maxy)
|
||||
|
||||
rhandlms = {}
|
||||
if self.results_hol.right_hand_landmarks:
|
||||
for id, lm in enumerate(self.results_hol.right_hand_landmarks.landmark):
|
||||
rhandlms[id] = lm
|
||||
|
||||
rhandrot(rhandlms, data, self.coef)
|
||||
rhandeuler(rhandlms, data, self.coef)
|
||||
|
||||
# if old_world:
|
||||
# rhandconvert(rhandlms, data, self.coef)
|
||||
@@ -205,7 +211,7 @@ class hpe_mp_class():
|
||||
for id, lm in enumerate(self.results_hol.left_hand_landmarks.landmark):
|
||||
lhandlms[id] = lm
|
||||
|
||||
lhandrot(lhandlms,data,self.coef)
|
||||
lhandeuler(lhandlms,data,self.coef)
|
||||
|
||||
# if old_world:
|
||||
# lhandconvert(lhandlms, data, self.coef)
|
||||
|
||||
Reference in New Issue
Block a user