code: public void normalizeDepths( DMatrixRMaj depths ) {
  		// normalize rows first
  		for (int row = 0; row < depths.numRows; row++) {
  			int idx = row*depths.numCols;
  			double sum = 0;
  			for (int col = 0; col < depths.numCols; col++) {
  				double v = depths.data[idx++];
  				sum += v*v;
  			}
  			double norm = Math.sqrt(sum)/depths.numCols;
  			idx = row*depths.numCols;
  			for (int j = 0; j < depths.numCols; j++) {
  				depths.data[idx++] /= norm;
  			}
  		}
  
  		// normalize columns
  		for (int col = 0; col < depths.numCols; col++) {
  			double norm = 0;
  			for (int row = 0; row < depths.numRows; row++) {
  				double v = depths.get(row,col);
  				norm += v*v;
  			}
  			norm = Math.sqrt(norm);
  			for (int row = 0; row < depths.numRows; row++) {
  				depths.data[depths.getIndex(row,col)] /= norm;
  			}
  		}
  	}
docs: <p>Rescale A so that its rows and columns have a value of approximately 1. This is done to try to get
  everything set to unity for desirable numerical properties</p>
  
  (&alpha; &beta; &lambda;) x = (&alpha;P)(&beta;X)