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

Method Detection

detection/src/detection.cpp:47–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45 {
46
47 Detection::Detection(opt_msgs::Detection detection, open_ptrack::detection::DetectionSource* source) :
48 detection_msg_(detection), source_(source)
49 {
50 // Transform centroid, top and bottom points from camera frame to world frame:
51 Eigen::Vector3d v;
52 v(0) = detection.centroid.x;
53 v(1) = detection.centroid.y;
54 v(2) = detection.centroid.z;
55 world_centroid_ = source->transform(v);
56
57 v(0) = detection.top.x;
58 v(1) = detection.top.y;
59 v(2) = detection.top.z;
60 world_top_ = source->transform(v);
61
62 v(0) = detection.bottom.x;
63 v(1) = detection.bottom.y;
64 v(2) = detection.bottom.z;
65 world_bottom_ = source->transform(v);
66 }
67
68 Detection::~Detection()
69 {

Callers

nothing calls this directly

Calls 1

transformMethod · 0.80

Tested by

no test coverage detected