docs: public static void process(GrayU8 input, GrayU8 output, int radius, int offset[], int histogram[] ) {
  		if( histogram == null )
  			histogram = new int[ 256 ];
  		else if( histogram.length < 256 )
  			throw new IllegalArgumentException("'histogram' must have at least 256 elements.");
  
  		int w = 2*radius+1;
  		if( offset == null ) {
  			offset = new int[ w*w ];
  		} else if( offset.length < w*w ) {
  			throw new IllegalArgumentException("'offset' must be at least of length "+(w*w));
  		}
  		int threshold = (w*w)/2+1;
  
  		int index = 0;
  		for( int i = -radius; i <= radius; i++ ) {
  			for( int j = -radius; j <= radius; j++ ) {
  				offset[index++] = i*input.stride + j;
  			}
  		}
  
  		for( int y = radius; y < input.height-radius; y++ ) {
  			for( int x = radius; x < input.width-radius; x++ ) {
  				int seed = input.startIndex + y*input.stride+x;
  
  				for( int i = 0; i < 256; i++ ) {
  					histogram[i] = 0;
  				}
  
  				for( int i = 0; i < offset.length; i++ ) {
  					int val = input.data[seed+offset[i]] & 0xFF;
  					histogram[val]++;
  				}
  
  				int count = 0;
  				int median;
  				for( median = 0; median < 256; median++ ) {
  					count += histogram[median];
  					if( count >= threshold )
  						break;
  				}
  				output.data[ output.startIndex+y*output.stride+x] = (byte)median;
  			}
  		}
  	}