use of boofcv.struct.border.ImageBorder_S32 in project BoofCV by lessthanoptimal.
the class TestGradientSobel method compareToConvolve_I16.
@Test
void compareToConvolve_I16() throws NoSuchMethodException {
CompareDerivativeToConvolution validator = new CompareDerivativeToConvolution();
validator.setTarget(GradientSobel.class.getMethod("process", GrayS16.class, GrayS16.class, GrayS16.class, ImageBorder_S32.class));
validator.setKernel(0, GradientSobel.kernelDerivX_I32);
validator.setKernel(1, GradientSobel.kernelDerivY_I32);
GrayS16 input = new GrayS16(width, height);
ImageMiscOps.fillUniform(input, rand, 0, 10);
GrayS16 derivX = new GrayS16(width, height);
GrayS16 derivY = new GrayS16(width, height);
validator.compare(input, derivX, derivY);
}
use of boofcv.struct.border.ImageBorder_S32 in project BoofCV by lessthanoptimal.
the class TestDerivativeLaplacian method process_U8_S16.
public void process_U8_S16(GrayU8 img, GrayS16 deriv) {
ImageBorder_S32<GrayU8> border = (ImageBorder_S32) FactoryImageBorder.single(BorderType.EXTENDED, GrayU8.class);
DerivativeLaplacian.process(img, deriv, border);
GrayS16 expected = deriv.createSameShape();
ConvolveImage.convolve(DerivativeLaplacian.kernel_I32, img, expected, border);
BoofTesting.assertEquals(expected, deriv, 0);
}
use of boofcv.struct.border.ImageBorder_S32 in project BoofCV by lessthanoptimal.
the class TestGradientPrewitt method compareToConvolve_I8.
@Test
void compareToConvolve_I8() throws NoSuchMethodException {
CompareDerivativeToConvolution validator = new CompareDerivativeToConvolution();
validator.setTarget(GradientPrewitt.class.getMethod("process", GrayU8.class, GrayS16.class, GrayS16.class, ImageBorder_S32.class));
validator.setKernel(0, GradientPrewitt.kernelDerivX_I32);
validator.setKernel(1, GradientPrewitt.kernelDerivY_I32);
GrayU8 input = new GrayU8(width, height);
ImageMiscOps.fillUniform(input, rand, 0, 10);
GrayS16 derivX = new GrayS16(width, height);
GrayS16 derivY = new GrayS16(width, height);
validator.compare(input, derivX, derivY);
}
use of boofcv.struct.border.ImageBorder_S32 in project BoofCV by lessthanoptimal.
the class TestGradientPrewitt method compareToConvolve_I16.
@Test
void compareToConvolve_I16() throws NoSuchMethodException {
CompareDerivativeToConvolution validator = new CompareDerivativeToConvolution();
validator.setTarget(GradientPrewitt.class.getMethod("process", GrayS16.class, GrayS16.class, GrayS16.class, ImageBorder_S32.class));
validator.setKernel(0, GradientPrewitt.kernelDerivX_I32);
validator.setKernel(1, GradientPrewitt.kernelDerivY_I32);
GrayS16 input = new GrayS16(width, height);
ImageMiscOps.fillUniform(input, rand, 0, 10);
GrayS16 derivX = new GrayS16(width, height);
GrayS16 derivY = new GrayS16(width, height);
validator.compare(input, derivX, derivY);
}
use of boofcv.struct.border.ImageBorder_S32 in project BoofCV by lessthanoptimal.
the class TestGradientScharr method compareToConvolve_I16.
@Test
void compareToConvolve_I16() throws NoSuchMethodException {
CompareDerivativeToConvolution validator = new CompareDerivativeToConvolution();
validator.setTarget(GradientScharr.class.getMethod("process", GrayS16.class, GrayS16.class, GrayS16.class, ImageBorder_S32.class));
validator.setKernel(0, GradientScharr.kernelDerivX_I32);
validator.setKernel(1, GradientScharr.kernelDerivY_I32);
GrayS16 input = new GrayS16(width, height);
ImageMiscOps.fillUniform(input, rand, 0, 10);
GrayS16 derivX = new GrayS16(width, height);
GrayS16 derivY = new GrayS16(width, height);
validator.compare(input, derivX, derivY);
}
Aggregations