Camera Parameter and Object Detection

Have couple of questions regarding API v4.

  1. In the image camera parameters, is this the actual focal length [1] in mm or is it the focal ratio (like in the OpenSFM docs)? If focal ratio, how was this calculated?

  2. Are object detections available in v4 similar to the way they were in the past [2]? I saw that point features and traffic signs are available, but have not come across object detections so far. Wanted to make sure I was not overlooking them.

Current references:
[1] Mapillary
[2] https://help.mapillary.com/hc/en-us/articles/115000967191-Object-detections

In the image camera parameters, is this the actual focal length [1] in mm or is it the focal ratio (like in the OpenSFM docs)?

It is the focal ratio.

If focal ratio, how was this calculated?

The beauty of a ratio is that it does not matter. However, for the sake of completeness, it supposed to be the focal ratio in a 35 mm film.
This is how it is computed by OpenSfM initially:

Unfortunately, to be more specific, there is a slight bug in OpenSfM’s compute_focal() function because it defines the focal ratio to be the quotient of the focal length and the focal plane’s width instead of the focal length and the length of the focal plane’s hypotenuse. Using the focal plane’s width only assumes in this context that all images consumed by OpenSfM have a 3:2 (as the 35 mm film does) aspect ratio, which of course is not the case for all of Mapillary’s imagery.

Note also that the Mapillary API returns the computed focal ratio, not the true or metadata focal ratio.

1 Like

Thanks a ton! I was kind of leaning towards they meant focal ratio. Their use of “focal length” in the documentation threw me off.

Interesting. I may have to think about how to use that data when integrating the imagery for comparison into COLMAP.

To be more specific (and hopefully avoid confusion) I was referring to the “camera_parameters” metadata described in the Mapillary API documentation (see screenshot). Wanted to post this to be more explicit about what I was referring to in regards to “focal length”.

Yeah, proper naming, it’s so overrated and hard to do…, I guess? :man_shrugging:

camera_parameters actually means projection parameters. But hey, who am I to know? :rofl: