code: protected void computeWeightBlockPixels() {
  
  		int rows = cellsPerBlockY*pixelsPerCell;
  		int cols = cellsPerBlockX*pixelsPerCell;
  
  		weights = new double[ rows*cols ];
  
  		double offsetRow=0,offsetCol=0;
  		int radiusRow=rows/2,radiusCol=cols/2;
  		if( rows%2 == 0 ) {
  			offsetRow = 0.5;
  		}
  		if( cols%2 == 0 ) {
  			offsetCol = 0.5;
  		}
  
  		// use linear seperability of a Gaussian to make computation easier
  		// sigma is 1/2 the width along each axis
  		int index = 0;
  		for (int row = 0; row < rows; row++) {
  			double drow = row-radiusRow+offsetRow;
  			double pdfRow = UtilGaussian.computePDF(0, radiusRow, drow);
  
  			for (int col = 0; col < cols; col++) {
  				double dcol = col-radiusCol+offsetCol;
  				double pdfCol = UtilGaussian.computePDF(0, radiusCol, dcol);
  
  				weights[index++] = pdfCol*pdfRow;
  			}
  		}
  		// normalize so that the largest value is 1.0
  		double max = 0;
  		for (int i = 0; i < weights.length; i++) {
  			if( weights[i] > max ) {
  				max = weights[i];
  			}
  		}
  		for (int i = 0; i < weights.length; i++) {
  			weights[i] /= max;
  		}
  	}
docs: Compute gaussian weights applied to each pixel in the block