MJ::Pose
Inherits JSON::Serializable < Reference < Object
Constants
KEYPOINT_COLORS = [{255, 0, 0}, {255, 85, 0}, {255, 170, 0}, {255, 255, 0}, {170, 255, 0}, {85, 255, 0}, {0, 255, 0}, {0, 255, 85}, {0, 255, 170}, {0, 255, 255}, {0, 170, 255}, {0, 85, 255}, {0, 0, 255}, {85, 0, 255}, {170, 0, 255}, {255, 0, 255}, {255, 0, 170}, {255, 0, 85}]
Rainbow gradient colors for keypoints (R, G, B)
KEYPOINT_INDEX = KEYPOINT_NAMES.each_with_index.to_h
KEYPOINT_NAMES = ["nose", "neck", "right_shoulder", "right_elbow", "right_wrist", "left_shoulder", "left_elbow", "left_wrist", "right_hip", "right_knee", "right_ankle", "left_hip", "left_knee", "left_ankle", "right_eye", "left_eye", "right_ear", "left_ear"]
COCO 18-keypoint names
LIMB_COLORS = [{0, 0, 153}, {153, 0, 0}, {153, 51, 0}, {153, 102, 0}, {153, 153, 0}, {102, 153, 0}, {51, 153, 0}, {0, 153, 0}, {0, 153, 51}, {0, 153, 102}, {0, 153, 153}, {0, 102, 153}, {0, 51, 153}, {51, 0, 153}, {102, 0, 153}, {153, 0, 153}, {153, 0, 102}]
Colors for each limb connection
LIMB_PAIRS = [{1, 0}, {1, 2}, {1, 5}, {2, 3}, {3, 4}, {5, 6}, {6, 7}, {1, 8}, {8, 9}, {9, 10}, {1, 11}, {11, 12}, {12, 13}, {0, 14}, {14, 16}, {0, 15}, {15, 17}]
17 limb connections [from, to]
Constructors
Create from Runware preprocess response (flat array: [x0,y0,c0, x1,y1,c1, ...])
new(pull : JSON::PullParser)
Sourcenew(*, __pull_for_json_serializable pull : JSON::PullParser)
SourceInstance methods
keypoints
Source