double computeError( List<AssociatedPair> points , Se3_F64 worldToCamera ) {

		double error = 0;

		for (int i = 0; i < points.size(); i++) {
			AssociatedPair pair = points.get(i);
			tmpP.set(pair.p1.x,pair.p1.y,0);
			SePointOps_F64.transform(worldToCamera,tmpP,tmpP);

			error += pair.p2.distance2(tmpP.x/tmpP.z,tmpP.y/tmpP.z);
		}

		return Math.sqrt(error/points.size());
	}
double computeError ( List < AssociatedPair > points , Se3_F64 worldToCamera ) { double error = 0 ; for ( int i = 0 ; i < points . size ( ) ; i ++ ) { AssociatedPair pair = points . get ( i ) ; tmpP . set ( pair . p1 . x , pair . p1 . y , 0 ) ; SePointOps_F64 . transform ( worldToCamera , tmpP , tmpP ) ; error += pair . p2 . distance2 ( tmpP . x / tmpP . z , tmpP . y / tmpP . z ) ; } return Math . sqrt ( error / points . size ( ) ) ; }
Computes reprojection error to select best model