Skip to content

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

@2hanhan

Description

@2hanhan

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);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions