Skip to content

Commit 76a346b

Browse files
committed
cast _fit_frame() interior params to float for yaml output
1 parent d89ac64 commit 76a346b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

orthority/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ def _ortho(
566566
type=click.BOOL,
567567
default=False,
568568
show_default=True,
569-
help='Export camera parameters to orthority format file(s), and exit.',
569+
help='Export camera parameters to Orthority format file(s), and exit.',
570570
)
571571
out_dir_option = click.option(
572572
'-od',

orthority/fit.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -275,15 +275,15 @@ def _fit_frame(
275275
cam_id = f'{cam_type!r}_fit_to_{ttl_gcps}_gcps'
276276
c_xy = (K[0, 2], K[1, 2]) - (np.array(im_size) - 1) / 2
277277
c_xy /= max(im_size)
278-
dist_param = dict(zip(_frame_dist_params[cam_type], dist_param.squeeze().tolist()))
278+
dist_param = dict(zip(_frame_dist_params[cam_type], dist_param.squeeze().tolist()))cast
279279

280280
int_param = dict(
281281
cam_type=cam_type,
282282
im_size=im_size,
283-
focal_len=(K[0, 0], K[1, 1]),
283+
focal_len=(float(K[0, 0]), float(K[1, 1])),
284284
sensor_size=(float(im_size[0]), float(im_size[1])),
285-
cx=c_xy[0],
286-
cy=c_xy[1],
285+
cx=float(c_xy[0]),
286+
cy=float(c_xy[1]),
287287
**dist_param,
288288
)
289289
int_param_dict = {cam_id: int_param}

0 commit comments

Comments
 (0)