docs: private void computeFeatures(double cx , double cy , ChessboardCorner corner ) {
  		double r = shiRadius +2;
  
  		// magnitude of the difference is used remove false chessboard corners caused by the corners on black
  		// squares. In that situation there will be a large difference between the left and right values
  		// in the integral below for 1/2 the lines
  		double sumDifference = 0;
  		for (int i = 0; i < numLines; i++) {
  			// TODO precompute sines and cosines
  			double angle = Math.PI*i/ numLines -Math.PI/2.0;
  			double c = Math.cos(angle);
  			double s = Math.sin(angle);
  
  			double x0 = cx-r*c;
  			double y0 = cy-r*s;
  			double x1 = cx+r*c;
  			double y1 = cy+r*s;
  
  			double left = integral.compute(cx,cy,x0,y0);
  			double right = integral.compute(cx,cy,x1,y1);
  
  			sumDifference += Math.abs(left-right);
  
  			lines[i] = left+right;
  		}
  
  		// smooth by applying a block filter. This will ensure it doesn't point towards an edge which just happens
  		// to be slightly darker than the center
  		int r_smooth = numLines /8; //  when viewed head on the black region will be 1/4 of a circle
  		int w_smooth = r_smooth*2+1;
  		for (int i = 0; i < numLines; i++) {
  			int start = addOffset(i,-r_smooth, numLines);
  
  			double sum = 0;
  			for (int j = 0; j < w_smooth; j++) {
  				int index = addOffset(start,j, numLines);
  				sum += lines[index];
  			}
  			smoothed[i] = sum / w_smooth;
  		}
  
  		int indexMin = 0;
  		double valueMin = Double.MAX_VALUE;
  		for (int i = 0; i < numLines; i++) {
  			if( smoothed[i] < valueMin ) {
  				valueMin = smoothed[i];
  				indexMin = i;
  			}
  		}
  
  		// Use a quadratic to estimate the peak's location to a sub-bin accuracy
  		double value0 = smoothed[ addOffset(indexMin,-1, numLines)];
  		double value2 = smoothed[ addOffset(indexMin, 1, numLines)];
  
  		double adjustedIndex = indexMin + FastHessianFeatureDetector.polyPeak(value0,valueMin,value2);
  		corner.orientation = Math.PI*adjustedIndex/ numLines -Math.PI/2.0;
  
  		// Score the corner's fit quality using the fact that the function would be oscilate (sin/cosine)
  		// and values 90 degrees offset are at the other side
  		double intensity = 0;
  		for (int i = 0; i < numLines /2; i++) {
  			int idx0 = addOffset(indexMin,i- numLines /4, numLines);
  			int idx1 = addOffset(idx0, numLines /2, numLines);
  			intensity += smoothed[idx1] - smoothed[idx0];
  		}
  		corner.intensity = intensity/(r*2+1+ numLines/2);
  		corner.intensity /= (sumDifference/numLines);
  	}