def match_obj_to_kalmanized_obj(h5source, original_obj_id, kalmanizedsource=None): original_trajectory = ffa.load_trajectory(source=h5source, obj=original_obj_id) if kalmanizedsource == None: kalmanizedsource = h5source kalmanizedsource = kalmanizedsource.rstrip('.h5') kalmanizedsource = kalmanizedsource + '.kalmanized.h5' if kalmanizedsource.__class__ is not ffa.Dataset: dataset = ffa.Dataset() dataset.load_data(kalmanizedsource,kalman_smoothing = True) else: dataset = kalmanizedsource best_match = find_match(original_trajectory, dataset) return best_match
def send_trajectory_to_player(source, obj, num, fps): trajectory = ffa.load_trajectory(source, obj, num) trajectoryplayer = TrajectoryPlayer(trajectory, fps=fps) return trajectoryplayer