Nonparametric estimation of the cross ratio function