You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I like to send detected skeletons from one program to another in a custom format. In this format I like to refer to each body joint by its name like SHOULDER_LEFT rather than its ID 5. I could map IDs to names using the K4ABT_JOINT_NAMES list. But the names in K4ABT_JOINT_NAMES are not really suited for my purpose, because they contain spaces and dashes and the order of words is reversed.
I would prefer to get the name directly from the constant. This would be much easier if the constants are part of an enum.
from enum import Enum
class K4ABT_JOINTS(Enum):
K4ABT_JOINT_PELVIS = 0
K4ABT_JOINT_SPINE_NAVEL = 1
K4ABT_JOINT_SPINE_CHEST = 2
K4ABT_JOINT_NECK = 3
# Now its easy to get the name of the joint from the ID
K4ABT_JOINTS(0).name
'K4ABT_JOINT_PELVIS'
K4ABT_JOINTS(3).name
'K4ABT_JOINT_NECK'
If you have no objections against this, I could provide a pull request.
Also the JOINT constants could be used more consistently.
Currently, in the definition of the K4ABT_SEGMENT_PAIRS the indices are used instead of the constants.
The text was updated successfully, but these errors were encountered:
I like to send detected skeletons from one program to another in a custom format. In this format I like to refer to each body joint by its name like SHOULDER_LEFT rather than its ID 5. I could map IDs to names using the K4ABT_JOINT_NAMES list. But the names in K4ABT_JOINT_NAMES are not really suited for my purpose, because they contain spaces and dashes and the order of words is reversed.
I would prefer to get the name directly from the constant. This would be much easier if the constants are part of an enum.
If you have no objections against this, I could provide a pull request.
Also the JOINT constants could be used more consistently.
Currently, in the definition of the K4ABT_SEGMENT_PAIRS the indices are used instead of the constants.
The text was updated successfully, but these errors were encountered: