MCPcopy Create free account
hub / github.com/OpenShot/libopenshot / Contains

Method Contains

src/TrackedObjectBBox.cpp:82–93  ·  view source on GitHub ↗

Check if there is a bounding-box in the given frame

Source from the content-addressed store, hash-verified

80
81// Check if there is a bounding-box in the given frame
82bool TrackedObjectBBox::Contains(int64_t frame_num) const
83{
84 // Get the time of given frame
85 double time = this->FrameNToTime(frame_num, 1.0);
86 // Create an iterator that points to the BoxVec pair indexed by the time of given frame (or the closest time)
87 auto it = BoxVec.lower_bound(time);
88 if (it == BoxVec.end()){
89 // BoxVec pair not found
90 return false;
91 }
92 return true;
93}
94
95// Check if there is a bounding-box in the exact frame number
96bool TrackedObjectBBox::ExactlyContains(int64_t frame_number) const

Callers 1

add_property_jsonMethod · 0.45

Calls 1

FrameNToTimeMethod · 0.95

Tested by

no test coverage detected