Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Late initialization causes beginning of the trajectory to be missing #348

Open
youknowimcomingwhenyouhearmehumming opened this issue Jul 20, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@youknowimcomingwhenyouhearmehumming

Describe the bug

Sometimes the system cannot initialize from the beginning of a video if there are only few features in the images in the first part of the video. Therefore, the system initialized sometimes later - let's say at frame 50. Consequently, the trajectory between frame 0-50 is missing.

Suggested solution

This missing start trajectory can often be recovered by using exploiting the fact that the feature criteria for initialization is stricter than for the subsequently tracking. The recovery progress in this case is done by, at some point after the initialization, the video is set to frame 49 and running backwards with frame 48, 47, 46...0.

This works but there is a twist: the system is not able to handle frames with timestamps from the past. In my case, I use the function feed_monocular_frame(img, timestamp, mask). Instead of using the correct timestamps, when I feed the previous frames (49, 48, 47...0), I have to input timestamps that keep being ahead in time/in the future,

The problem of using timestamps that are in the past occurs in at least two places in the code:

  • in file tracking_module.cc:
    if (curr_frm_.timestamp_ < last_reloc_frm_timestamp_ + 1.0) {
    return false;
    }

  • keyframe_inserter.cc:
    bool min_interval_elapsed = false;
    if (min_interval_ > 0.0) {
    min_interval_elapsed = last_inserted_keyfrm && last_inserted_keyfrm->timestamp_ + min_interval_ <= curr_frm.timestamp_;
    min_interval_elapsed = true;
    }

Environment

  • Hardware: [PC]
  • CPU: [AMD Ryzen 7 5800X 8-Core Processor]
  • OS: [Ubuntu 22.04]
  • In my case it is not necessary to processes the video in real time
@youknowimcomingwhenyouhearmehumming youknowimcomingwhenyouhearmehumming added the bug Something isn't working label Jul 20, 2022
@ymd-stella ymd-stella added enhancement New feature or request and removed bug Something isn't working labels Jul 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants