Skip to content
Snippets Groups Projects
Commit 39528813 authored by Joan Solà Ortega's avatar Joan Solà Ortega
Browse files

Change API of unmarkKeyframe to accept a capture and not a frame.

Only the capture's time stamp can be used to access the track's features.
parent 990fb233
No related branches found
No related tags found
1 merge request!286Change API of unmarkKeyframe to accept a capture and not a frame.
Pipeline #3631 passed
......@@ -102,7 +102,7 @@ class TrackMatrix
SizeStd numKeyframeTracks();
Track trackAtKeyframes(size_t _track_id);
bool markKeyframe(CaptureBasePtr _capture);
bool unmarkKeyframe(FrameBasePtr _keyframe);
bool unmarkKeyframe(CaptureBasePtr _capture);
private:
......
......@@ -247,10 +247,10 @@ bool TrackMatrix::markKeyframe(CaptureBasePtr _capture)
return false;
}
bool TrackMatrix::unmarkKeyframe(FrameBasePtr _keyframe)
bool TrackMatrix::unmarkKeyframe(CaptureBasePtr _capture)
{
bool removed = false;
auto ts = _keyframe->getTimeStamp();
auto ts = _capture->getTimeStamp();
for (auto pair_id_trk : tracks_kf_)
{
if (pair_id_trk.second.erase(ts))
......
......@@ -455,7 +455,7 @@ TEST_F(TrackMatrixTest, unmarkKeyframe)
ASSERT_EQ(track_matrix.numKeyframeTracks(), (unsigned int) 1);
F0->setNonEstimated();
track_matrix.unmarkKeyframe(F0);
track_matrix.unmarkKeyframe(C0);
/* C0 C1 C2 C3 snapshots
*
* f0---f1---f2 trk 0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment