MCPcopy Create free account
hub / github.com/OpenPTrack/open_ptrack_v2 / SkeletonDetection

Method SkeletonDetection

detection/src/skeleton_detection.cpp:128–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

126}
127
128SkeletonDetection::SkeletonDetection
129(const rtpose_wrapper::SkeletonMsg &detection,
130 open_ptrack::detection::DetectionSource* source):
131 Detection (opt_msgs::Detection(), source)
132{
133 detection_msg_ = detection;
134 source_ = source;
135
136 Eigen::Vector3d v = computeCentroid();
137 world_centroid_ = source->transform(v);
138
139 for(auto it = detection_msg_.joints.begin(),
140 end = detection_msg_.joints.end(); it !=end; ++it)
141 {
142 int index = (it - detection_msg_.joints.begin());
143 Eigen::Vector3d tmp = source->transform(Eigen::Vector3d
144 (it->x, it->y, it->z));
145 it->x = tmp(0);
146 it->y = tmp(1);
147 it->z = tmp(2);
148 }
149
150}
151
152Eigen::Vector3d
153SkeletonDetection::computeCentroid() const

Callers

nothing calls this directly

Calls 4

DetectionClass · 0.85
transformMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected