def _optimized_params(params, n_cams, n_pts):
    """
    Retrieve camera parameters and 3-D coordinates.
    """
    cam_params = params[:n_cams * 6].reshape((n_cams, 6))
    pts3d = params[n_cams * 6:].reshape((n_pts, 3))

    return cam_params, pts3d