OpenSfM icon indicating copy to clipboard operation
OpenSfM copied to clipboard

Issues with reconstructing using images from GoPro Hero 4 Session

Open zidel opened this issue 4 years ago • 1 comments

My GoPro Hero 4 Session apparently produces images with "Focal Length in 35mm" set to 1, which produces horrible results when trying to reconstruct a scene. When I change compute_focal to only use focal_35 > 1 and provide the sensor size (4.57mm) through sensor_data.json I get the results I expect.

I'm not really sure what has changed and where but my January uploads to Mapillary with this camera were fine while my uploads in September have issues. Because of build issues I haven't been able to check if older OpenSfM versions produce the same issues, and I don't have older images I can use to check for changes in the exif data.

Is it reasonable for OpenSfM to ignore exif data if the 35mm focal length is reported as <= 1?

Example Mapillary image with issues: https://www.mapillary.com/app/?lat=59.9627934&lng=11.0542162&z=17&pKey=1035824187167841&focus=photo

zidel avatar Sep 23 '21 14:09 zidel

I think that it is reasonable to ignore tiny focal lengths since they are unlikely to be real. It is difficult though to know where to put the threshold. A more reliable solution, if you are running opensfm locally, i would recommend that you set the camera parameters manually to make sure that the camera is treated as a fisheye. This will improve the results for GoPro. You can do that by adding a file named camera_models_overrides.json to the dataset folder and putting the following contents on it

{
    "all": {
        "projection_type": "fisheye",
        "width": 3264,
        "height": 2448,
        "focal": 0.45,
        "k1": 0.0,
        "k2": 0.0
    }
}

On the mapillary side, we are updating the calibration database to handle your camera better. Thanks for reporting!

paulinus avatar Sep 24 '21 12:09 paulinus