/** * Sets half-width of Gaussian derivative filter used to compute gradients. * Typically, this half-width should not exceed one-fourth that of the * the corresponding Gaussian window used to compute local averages of * gradient products. * The default half-width for Gaussian derivatives is 1.0. * @param sigma half-width of derivatives; same for all dimensions. */ public void setGradientSmoothing(double sigma) { setGradientSmoothing(sigma,sigma,sigma); }
/** * Sets half-widths of Gaussian derivative filters used to compute gradients. * Typically, these half-widths should not exceed one-fourth those of the * the corresponding Gaussian windows used to compute local averages of * gradient-squared tensors. * The default half-widths for Gaussian derivatives is 1.0. * @param sigma1 half-width of derivative in 1st dimension. * @param sigma2 half-width of derivatives in 2nd and higher dimensions. */ public void setGradientSmoothing(double sigma1, double sigma2) { setGradientSmoothing(sigma1,sigma2,sigma2); }
/** * Constructs a filter with a possibly anisotropic Gaussian window. * @param sigma1 half-width of window in 1st dimension. * @param sigma2 half-width of window in 2nd dimension. * @param sigma3 half-width of window in 3rd and higher dimensions. */ public LocalOrientFilter(double sigma1, double sigma2, double sigma3) { _rgfSmoother1 = (sigma1>=1.0)?new RecursiveGaussianFilter(sigma1):null; if (sigma2==sigma1) { _rgfSmoother2 = _rgfSmoother1; } else { _rgfSmoother2 = (sigma2>=1.0)?new RecursiveGaussianFilter(sigma2):null; } if (sigma3==sigma2) { _rgfSmoother3 = _rgfSmoother2; } else { _rgfSmoother3 = (sigma3>=1.0)?new RecursiveGaussianFilter(sigma3):null; } setGradientSmoothing(1.0); }