code: private void refineMotionEstimate() {
  
  		// use observations from the inlier set
  		List<Stereo2D3D> data = new ArrayList<>();
  
  		int N = matcher.getMatchSet().size();
  		for( int i = 0; i < N; i++ ) {
  			int index = matcher.getInputIndex(i);
  
  			PointTrack l = candidates.get(index);
  			LeftTrackInfo info = l.getCookie();
  			PointTrack r = info.right;
  
  			Stereo2D3D stereo = info.location;
  			// compute normalized image coordinate for track in left and right image
  			leftImageToNorm.compute(l.x,l.y,info.location.leftObs);
  			rightImageToNorm.compute(r.x,r.y,info.location.rightObs);
  
  			data.add(stereo);
  		}
  
  		// refine the motion estimate using non-linear optimization
  		Se3_F64 keyToCurr = currToKey.invert(null);
  		Se3_F64 found = new Se3_F64();
  		if( modelRefiner.fitModel(data,keyToCurr,found) ) {
  			found.invert(currToKey);
  		}
  	}
docs: Non-linear refinement of motion estimate