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

This may be a BUG in /src/Matcher.cc #27

Open
2hanhan opened this issue Mar 28, 2022 · 0 comments
Open

This may be a BUG in /src/Matcher.cc #27

2hanhan opened this issue Mar 28, 2022 · 0 comments

Comments

@2hanhan
Copy link

2hanhan commented Mar 28, 2022

I think this may be a bug in the program src/Matcher.cc on lines 68 to 75.The original code is as follows:

        // The size of the window will depend on the viewing direction
        float r = RadiusByViewingCos(pMP->mTrackViewCos);

        if(bFactor)
            r*=th;

        const std::vector<size_t> vIndices =
                F.GetFeaturesInArea(pMP->mTrackProjX,pMP->mTrackProjY,1,nPredictedLevel-1,nPredictedLevel);

The program comment is described as "The size of the window will depend on the viewing direction",but here the size is fixed to 1 pixel. It's strange. After testing, I found that setting the size to 1.2*r makes the tracking more robust.
The modified code is as follows:

        // The size of the window will depend on the viewing direction
        float r = RadiusByViewingCos(pMP->mTrackViewCos);

        if(bFactor)
            r*=th;

        const std::vector<size_t> vIndices =
                F.GetFeaturesInArea(pMP->mTrackProjX,pMP->mTrackProjY,1.2*r,nPredictedLevel-1,nPredictedLevel);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant