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 always returns -1.00. #6

Closed
jm02394 opened this issue Sep 29, 2019 · 10 comments
Closed

--estimate-focal-length always returns -1.00. #6

jm02394 opened this issue Sep 29, 2019 · 10 comments

Comments

@jm02394
Copy link

jm02394 commented Sep 29, 2019

Hi, I downloaded this software today, and I recorded some footage to test it with. When I run --estimate-focal-length I get -1.00 for all 154 frames. I assume this is because of bad camera quality or something, but the camera quality seems good enough to be able to calculate the focal length at least one time out of 154.

This software is amazing and I hope I can get it to work, so any help would be appreciated. Thanks!

@thegoodhen
Copy link
Owner

thegoodhen commented Sep 29, 2019

Hello!
It's hard to tell without looking at the footage.
The software uses a vanishing points method in order to determine the camera focal length. This means it extends the sides of the square tag till they intersect and then calculates the focal length based on the position of the intersection. Generally, this works. However, in order to combat numerical instability, it discards the estimate when the opposing sides of the tag are too close to being parallel.

This might happen if you are viewing the tag from far, from angles close to "dead on" and/or when the tag is small.

You can take a different footage, estimate the focal length from it and then use the estimate to track the footage you wanted to track.

Alternatively, you can also provide the focal length in mm and the sensor width also in mm to the tracker, if you know those values (for example, if you googled them!).

Which camera do you have?

Also, can you show me the footage?

@jm02394
Copy link
Author

jm02394 commented Sep 30, 2019

Okay, this helped me get an understanding of what's going on. First of all, I was filming from an angle almost perpendicular to the ground, so there weren't many lines it could have used to determine the vanishing points. Second of all, I was using my terrible phone camera which had a ton of motion blur, which would make it even harder to pick out lines. Also, I did try googling the focal length and sensor width, but something seemed off with the tracking. I'm pretty sure that it was the motion blur, though. I'll try filming something with an actual camera tommorow and get back to you. EDIT: I was using the camera on my Samsung Galaxy S7.

@thegoodhen
Copy link
Owner

Hm... The camera perpendicular to the ground surely is the bigger problem there. I am pretty certain that Galaxy S7 should be good enough for the job. It's a 2016 phone and I tried shooting on iPhone 6 (2014) in bad lighting conditions without major problems.

Please .zip the file sequence and upload it somewhere (such as google drive), then post the link here. I'll try it myself.

@thegoodhen
Copy link
Owner

Actually, you should be able to tell whether the application sees the tags or not. It tells you how many images were unusable.

@thegoodhen
Copy link
Owner

@Poipt Any updates?

@jm02394
Copy link
Author

jm02394 commented Oct 2, 2019

It totally slipped my mind yesterday, sorry. I'll have time today so I'll do it soon.

@thegoodhen
Copy link
Owner

No worries. I was just asking to know if I should close the issue or not.

@jm02394
Copy link
Author

jm02394 commented Oct 2, 2019

Alright, I tried it with footage with actual lines in it and it worked fine. Thanks for all of your help.

@jm02394 jm02394 closed this as completed Oct 2, 2019
@thegoodhen
Copy link
Owner

No problem! You're welcome. What do you mean by "actual lines" ? @Poipt

@jm02394
Copy link
Author

jm02394 commented Oct 2, 2019

I was filming on my floor, and I think the lines weren't thick enough to be detected.

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

2 participants