def compose_params(args): """Execute the subcommand 'compose' from the parser.""" surveyor = core.Surveyor(helpers.get_default_config()) surveyor.load(args.data) img = surveyor.compose_panorama(args.left, args.right, args.grid) cv2.imwrite(args.out, img) pass
def estimate_params(args): """Execute the subcommand 'estimate' from the parser.""" surveyor = core.Surveyor(helpers.get_default_config()) if args.type == 'fb': stitch = stitcher.FeatureBasedStitcher else: stitch = stitcher.RectangleStitcher surveyor.determine_mapping_parameters(args.left, args.right, args.left_angle, args.right_angle, args.left_camID, args.right_camID, stitch) surveyor.compose_panorama(args.left, args.right) surveyor.save(args.out)
def surveyor(config): return core.Surveyor(config)
log.info( 'Directory with parameter files: {directory}'.format(directory=PATH_PARAM)) log.info('--------------------------------------') with open(PATH_INTERVALS) as data_file: intervals = json.load(data_file) bbb_repro = bbb_r.Repository(PATH_REPRO_IN) bbb_converter = con_core.BBB_Converter() for interval in intervals: interval_id = interval['id'] log.info('# Starting mapping for Interval {id}'.format(id=interval_id)) path_param = get_parameter_path(PATH_PARAM, interval_id, CAM_LEFT, CAM_RIGHT) curr_surveyor = st_core.Surveyor() curr_surveyor.load(path_param) for key in ['left', 'right']: if interval[key] is None: log.warning( 'The side {side} of the Interval {int_id} is None'.format( side=key, int_id=interval['id'])) continue curr_cam_id = interval[key]['cam_id'] curr_start = iso8601.parse_date(interval[key]['ts_start']) curr_end = iso8601.parse_date(interval[key]['ts_end']) log.info( 'START Interval:{int_id} | Side: {side} | Cam_id:{cam_id}'.format(