docs: private void constructPyramid(GrayF32 input) {
  		if( pyramid.size() == 0 ){
  			pyramid.add(input);
  		} else {
  			pyramid.set(0,input);
  		}
  
  		// make sure the top most layer in the pyramid isn't too small
  		int pyramidTopSize = this.pyramidTopSize;
  		if( pyramidTopSize != 0 && pyramidTopSize < (1+2*detector.getKernelRadius())*5  ) {
  			pyramidTopSize = (1+2*detector.getKernelRadius())*5;
  		}
  
  		int levelIndex = 1;
  		int divisor = 2;
  		while( true ) {
  			int width = input.width/divisor;
  			int height = input.height/divisor;
  			if( pyramidTopSize == 0 || width < pyramidTopSize || height < pyramidTopSize)
  				break;
  			GrayF32 level;
  			if( pyramid.size() <= levelIndex ) {
  				level = new GrayF32(width,height);
  				pyramid.add(level);
  			} else {
  				level = pyramid.get(levelIndex);
  				level.reshape(width,height);
  			}
  			AverageDownSampleOps.down(pyramid.get(levelIndex-1),2,level);
  			divisor *= 2;
  			levelIndex += 1;
  		}
  		while( pyramid.size() > levelIndex) {
  			pyramid.remove( pyramid.size()-1 );
  		}
  
  		featureLevels.resize(pyramid.size());
  	}