optimize triangulation by correcting input data