public static String blur(int radius, int sigma) {
    if (radius < 1) {
      throw new IllegalArgumentException("Radius must be greater than zero.");
    }
    if (radius > 150) {
      throw new IllegalArgumentException("Radius must be lower or equal than 150.");
    }
    if (sigma < 0) {
      throw new IllegalArgumentException("Sigma must be greater than zero.");
    }
    return FILTER_BLUR + "(" + radius + "," + sigma + ")";
  }
public static String blur ( int radius , int sigma ) { if ( radius < 1 ) { throw new IllegalArgumentException ( "Radius must be greater than zero." ) ; } if ( radius > 150 ) { throw new IllegalArgumentException ( "Radius must be lower or equal than 150." ) ; } if ( sigma < 0 ) { throw new IllegalArgumentException ( "Sigma must be greater than zero." ) ; } return FILTER_BLUR + "(" + radius + "," + sigma + ")" ; }
This filter adds a blur effect to the image using the specified radius and sigma.
@param radius Radius used in the gaussian function to generate a matrix, maximum value is 150.
The bigger the radius more blurred will be the image.
@param sigma Sigma used in the gaussian function.