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

estimate-focal-length does not work for 4K video #7

Open
i124q2n8 opened this issue Sep 30, 2019 · 7 comments
Open

estimate-focal-length does not work for 4K video #7

i124q2n8 opened this issue Sep 30, 2019 · 7 comments

Comments

@i124q2n8
Copy link

I read #6 and filmed the footage according to the requirements. (.png, ~500 Frames)
Running --estimate-focal-length on the footage yields only one estimate != -1.

Down scaling the sequence to 25% of the original resolution does work and yields useful results.
Down scaling to 50% doesn't work either.

What is the optimal resolution to estimate the focal length?

Tracking on 50% with --focal-length-pixels {estimated focal length for 25% * 2} does work.

Maybe adding --focal-length-percent would be a nice addition to be independent from the actual resolution. Not sure whether this will work in general.

@thegoodhen thegoodhen pinned this issue Sep 30, 2019
@thegoodhen
Copy link
Owner

...Oh. Right. Of course it does!

I will fix that. That's a bug, which should be easy to fix. The focal length estimation uses vanishing points to estimate the focal length. It extends the sides of the square tag and finds intersection. To combat numerical instabilities, when the intersection is "too far away," it gives up, assuming that the sides are parallel. But the value for "too far away" was determined empirically on a fullHD footage. It should scale with the frame size, which it doesn't (such a dumb oversight :D) .

@thegoodhen
Copy link
Owner

It should be fixed. Can you please confirm it?

@i124q2n8
Copy link
Author

Now i don't even get results with the down scaled version. I am going to look into this later.

@thegoodhen
Copy link
Owner

Damnit. That makes no sense.
Well, at least it changed, so the problem is somewhere close.

@thegoodhen
Copy link
Owner

Aha! I think I know. Is the tag small, or viewed mostly from the front?

@thegoodhen
Copy link
Owner

@Map94 poke

@fvlasie
Copy link

fvlasie commented Feb 25, 2020

It is working for me with 4K footage!

Many thanks!

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

3 participants