Return a map that contains the bounding box properties and it's keyframes indexed by their names
| 496 | |
| 497 | // Return a map that contains the bounding box properties and it's keyframes indexed by their names |
| 498 | std::map<std::string, float> TrackedObjectBBox::GetBoxValues(int64_t frame_number) const { |
| 499 | |
| 500 | // Create the map |
| 501 | std::map<std::string, float> boxValues; |
| 502 | |
| 503 | // Get bounding box of the current frame |
| 504 | BBox box = GetBox(frame_number); |
| 505 | |
| 506 | // Save the bounding box properties |
| 507 | boxValues["cx"] = box.cx; |
| 508 | boxValues["cy"] = box.cy; |
| 509 | boxValues["w"] = box.width; |
| 510 | boxValues["h"] = box.height; |
| 511 | boxValues["ang"] = box.angle; |
| 512 | |
| 513 | // Save the keyframes values |
| 514 | boxValues["sx"] = this->scale_x.GetValue(frame_number); |
| 515 | boxValues["sy"] = this->scale_y.GetValue(frame_number); |
| 516 | boxValues["dx"] = this->delta_x.GetValue(frame_number); |
| 517 | boxValues["dy"] = this->delta_y.GetValue(frame_number); |
| 518 | boxValues["r"] = this->rotation.GetValue(frame_number); |
| 519 | |
| 520 | |
| 521 | return boxValues; |
| 522 | } |
no test coverage detected