use of boofcv.struct.convolve.Kernel1D in project BoofCV by lessthanoptimal.
the class TestConvolveImageStandard_SB method vertical.
/**
* Unit test for vertical convolution.
*/
public void vertical(ImageGray img, ImageGray dest) {
Kernel1D ker = FactoryKernel.createKernelForImage(kernelWidth, kernelRadius, 1, img.getClass());
// standard symmetric odd kernel shape
ker = FactoryKernel.random(ker.getClass(), kernelWidth, kernelRadius, 0, maxKernelValue, rand);
checkVertical(ker, img, dest);
// odd non-symmetric kernel shape
ker = FactoryKernel.random(ker.getClass(), kernelWidth, 0, 0, maxKernelValue, rand);
checkVertical(ker, img, dest);
// even non-symmetric kernel shape
ker = FactoryKernel.random(ker.getClass(), 2, 1, 0, maxKernelValue, rand);
checkVertical(ker, img, dest);
}
use of boofcv.struct.convolve.Kernel1D in project BoofCV by lessthanoptimal.
the class EdgeIntensitiesApp method derivByDerivOfBlur.
public void derivByDerivOfBlur() {
System.out.println("(Dx*G)*I");
T blur = GeneralizedImageOps.createSingleBand(imageType, width, height);
for (int sigma = 1; sigma <= 3; sigma++) {
Kernel1D g = FactoryKernelGaussian.gaussian1D(GrayF32.class, sigma, -1);
Kernel1D d = GradientThree.getKernelX(false);
Kernel1D god = GKernelMath.convolve1D(d, g);
ConvolveInterface<T, T> f = FactoryConvolve.convolve(god, ImageType.single(imageType), ImageType.single(imageType), BorderType.EXTENDED, true);
f.process(input, blur);
printIntensity("Sigma " + sigma, blur);
}
}
Aggregations