code: public static GrayU8 threshold( GrayS16 input , GrayU8 output ,
  										int threshold , boolean down )
  	{
  		output = InputSanityCheck.checkDeclare(input,output,GrayU8.class);
  
  		if(BoofConcurrency.USE_CONCURRENT ) {
  			ImplThresholdImageOps_MT.threshold(input, output, threshold, down);
  		} else {
  			ImplThresholdImageOps.threshold(input, output, threshold, down);
  		}
  
  		return output;
  	}
docs: Applies a global threshold across the whole image.  If 'down' is true, then pixels with values <=
  to 'threshold' are set to 1 and the others set to 0.  If 'down' is false, then pixels with values >
  to 'threshold' are set to 1 and the others set to 0.
  
  @param input Input image. Not modified.
  @param output (Optional) Binary output image. If null a new image will be declared. Modified.
  @param threshold threshold value.
  @param down If true then the inequality <= is used, otherwise if false then &gt; is used.
  @return Output image.