Search in sources :

Example 1 with PyramidDiscreteSampleBlur

use of boofcv.alg.transform.pyramid.PyramidDiscreteSampleBlur in project BoofCV by lessthanoptimal.

the class FactoryPyramid method discreteGaussian.

/**
 * Creates an updater for discrete pyramids where a Gaussian is convolved across the input
 * prior to sub-sampling.
 *
 * @param imageType Type of input image.
 * @param sigma Gaussian sigma.  If < 0 then a sigma is selected using the radius.  Try -1.
 * @param radius Radius of the Gaussian kernel.  If < 0 then the radius is selected using sigma. Try 2.
 * @return PyramidDiscrete
 */
public static <T extends ImageBase<T>> PyramidDiscrete<T> discreteGaussian(int[] scaleFactors, double sigma, int radius, boolean saveOriginalReference, ImageType<T> imageType) {
    Class<Kernel1D> kernelType = FactoryKernel.getKernelType(imageType.getDataType(), 1);
    Kernel1D kernel = FactoryKernelGaussian.gaussian(kernelType, sigma, radius);
    return new PyramidDiscreteSampleBlur<>(kernel, sigma, imageType, saveOriginalReference, scaleFactors);
}
Also used : Kernel1D(boofcv.struct.convolve.Kernel1D) PyramidDiscreteSampleBlur(boofcv.alg.transform.pyramid.PyramidDiscreteSampleBlur)

Aggregations

PyramidDiscreteSampleBlur (boofcv.alg.transform.pyramid.PyramidDiscreteSampleBlur)1 Kernel1D (boofcv.struct.convolve.Kernel1D)1