code: public static <T extends ImageBase<T>>
  	void equalizeLocal( T input , int radius , T output ,
  						int histogramLength , IWorkArrays workArrays ) {
  		if( input instanceof Planar ) {
  			Planar pi = (Planar)input;
  			Planar po = (Planar)output;
  			for (int i = 0; i < pi.getNumBands(); i++) {
  				equalizeLocal(pi.getBand(i),radius,po.getBand(i),histogramLength, workArrays);
  			}
  		} else {
  			if (input instanceof GrayU8) {
  				EnhanceImageOps.equalizeLocal((GrayU8) input, radius, (GrayU8) output, histogramLength, workArrays);
  			} else if (input instanceof GrayU16) {
  				EnhanceImageOps.equalizeLocal((GrayU16) input, radius, (GrayU16) output, histogramLength, workArrays);
  			} else {
  				throw new IllegalArgumentException("Unsupported image type " + input.getClass().getSimpleName());
  			}
  		}
  	}
docs: Equalizes the local image histogram on a per pixel basis.
  
  @param input Input image.
  @param radius Radius of square local histogram.
  @param output Output image.
  @param histogramLength Number of elements in the histogram. 256 for 8-bit images
  @param workArrays Used to create work arrays. can be null