code: static double determineScale(View base , Motion edge )
  		throws Exception
  	{
  		View viewA = edge.viewSrc;
  		View viewB = edge.viewDst;
  
  		boolean baseIsA = base == viewA;
  
  		// determine the scale factor difference
  		Point3D_F64 worldInBase3D = new Point3D_F64();
  		Point3D_F64 localInBase3D = new Point3D_F64();
  		GrowQueue_F64 scales = new GrowQueue_F64();
  		for (int i = 0; i < edge.stereoTriangulations.size(); i++) {
  			// get the feature as triangulated in this edge.
  			Feature3D edge3D = edge.stereoTriangulations.get(i);
  
  			int indexSrc = edge3D.obsIdx.get(0);
  			int indexDst = edge3D.obsIdx.get(1);
  
  			Feature3D world3D = baseIsA ? viewA.features3D[indexSrc] : viewB.features3D[indexDst];
  			if( world3D == null )
  				continue;
  			// Find the world point in the local coordinate system
  			SePointOps_F64.transformReverse(base.viewToWorld,world3D.worldPt,worldInBase3D);
  
  			// put this point into the base frame
  			if( !baseIsA ) {
  				SePointOps_F64.transform(edge.a_to_b,edge3D.worldPt,localInBase3D);
  			} else {
  				localInBase3D.set(edge3D.worldPt);
  			}
  
  			scales.add(worldInBase3D.z / localInBase3D.z);
  		}
  
  		if( scales.size < 20 ) {
  			throw new Exception("Not enough matches with known points");
  		}
  		// Get the scale offset as the median value to make it robust to noise
  		scales.sort();
  		return scales.getFraction(0.5);
  	}
docs: Determine scale factor difference between edge triangulation and world