code: protected void initializeClusters() {
  
  		int offsetX = Math.max(BORDER,((input.width-1) % gridInterval)/2);
  		int offsetY = Math.max(BORDER,((input.height-1) % gridInterval)/2);
  
  		int clusterId = 0;
  		clusters.reset();
  		for( int y = offsetY; y < input.height-BORDER; y += gridInterval ) {
  			for( int x = offsetX; x < input.width-BORDER; x += gridInterval ) {
  				Cluster c = clusters.grow();
  				c.id = clusterId++;
  				if( c.color == null)
  					c.color = new float[numBands];
  
  				// sets the location and color at the local minimal gradient point
  				perturbCenter( c , x , y );
  			}
  		}
  	}
docs: initialize all the clusters at regularly spaced intervals.  Their locations are perturbed a bit to reduce
  the likelihood of a bad location.  Initial color is set to the image color at the location