docs: public static GrayU8 convert(GrayF64 input , double min , double max , int numValues , GrayU8 output )
  	{
  		if (output == null) {
  			output = new GrayU8(input.width, input.height);
  		} else {
  			output.reshape(input.width,input.height);
  		}
  		if( numValues < 0 || numValues > 256 )
  			throw new IllegalArgumentException("0 <= numValues <= 256");
  
  		numValues -= 1;
  		double range = max-min;
  
  		for (int y = 0; y < input.height; y++) {
  			int indexIn = input.startIndex + y*input.stride;
  			int indexOut = output.startIndex + y*output.stride;
  
  			for (int x = 0; x < input.width; x++) {
  				int value = (int)(numValues*((input.data[indexIn++])-min)/range + 0.5);
  				output.data[indexOut++] = (byte)value;
  			}
  		}
  	return output;
  	}