def _get_optimized_params(params, n_cameras, n_points):
    """ Parse optimization results to camera params and 3D points"""
    camera_params = params[: n_cameras * 6].reshape((n_cameras, 6))
    points_3d = params[n_cameras * 6 :].reshape((n_points, 3))
    return camera_params, points_3d