Fix brown camera model GSD code

Former-commit-id: 087574c6bb
pull/1161/head
Piero Toffanin 2019-08-02 12:04:32 -04:00
rodzic 84b69b8090
commit 0e3b92a595
1 zmienionych plików z 5 dodań i 2 usunięć

Wyświetl plik

@ -118,7 +118,10 @@ def opensfm_reconstruction_average_gsd(reconstruction_json):
camera = reconstruction['cameras'][shot['camera']]
shot_height = shot['translation'][2]
focal_ratio = camera['focal']
focal_ratio = camera.get('focal', camera.get('focal_x'))
if not focal_ratio:
log.ODM_WARNING("Cannot parse focal values from %s. This is likely an unsupported camera model." % reconstruction_json)
return None
gsds.append(calculate_gsd_from_focal_ratio(focal_ratio,
shot_height - ground_height,