use of boofcv.struct.image.GrayS16 in project BoofCV by lessthanoptimal.
the class TestHessianSobel method compareToConvolve_I8.
@Test
public void compareToConvolve_I8() throws NoSuchMethodException {
CompareDerivativeToConvolution validator = new CompareDerivativeToConvolution();
validator.setTarget(HessianSobel.class.getMethod("process", GrayU8.class, GrayS16.class, GrayS16.class, GrayS16.class, ImageBorder_S32.class));
validator.setKernel(0, HessianSobel.kernelXX_I32);
validator.setKernel(1, HessianSobel.kernelYY_I32);
validator.setKernel(2, HessianSobel.kernelXY_I32);
GrayU8 input = new GrayU8(width, height);
ImageMiscOps.fillUniform(input, rand, 0, 10);
GrayS16 derivXX = new GrayS16(width, height);
GrayS16 derivYY = new GrayS16(width, height);
GrayS16 derivXY = new GrayS16(width, height);
validator.compare(input, derivXX, derivYY, derivXY);
}
use of boofcv.struct.image.GrayS16 in project BoofCV by lessthanoptimal.
the class TestLaplacianEdge method process_U8_S16.
@Test
public void process_U8_S16() {
GrayU8 img = new GrayU8(width, height);
ImageMiscOps.fillUniform(img, rand, 0, 100);
GrayS16 deriv = new GrayS16(width, height);
BoofTesting.checkSubImage(this, "process_U8_S16", true, img, deriv);
}
use of boofcv.struct.image.GrayS16 in project BoofCV by lessthanoptimal.
the class TestGradientPrewitt_Shared method compareToConvolve_I16.
@Test
public void compareToConvolve_I16() throws NoSuchMethodException {
CompareDerivativeToConvolution validator = new CompareDerivativeToConvolution();
validator.setTarget(GradientPrewitt_Shared.class.getMethod("process", GrayS16.class, GrayS16.class, GrayS16.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(false, input, derivX, derivY);
}
use of boofcv.struct.image.GrayS16 in project BoofCV by lessthanoptimal.
the class TestGradientPrewitt_Shared method compareToConvolve_I8.
@Test
public void compareToConvolve_I8() throws NoSuchMethodException {
CompareDerivativeToConvolution validator = new CompareDerivativeToConvolution();
validator.setTarget(GradientPrewitt_Shared.class.getMethod("process", GrayU8.class, GrayS16.class, GrayS16.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(false, input, derivX, derivY);
}
use of boofcv.struct.image.GrayS16 in project BoofCV by lessthanoptimal.
the class TestGradientSobel_Outer method process_I8_naive.
/**
* See if the same results are returned by the simple naive algorithm
*/
@Test
public void process_I8_naive() {
for (int offY = 0; offY < 3; offY++) {
for (int offX = 0; offX < 3; offX++) {
int w = width + offX;
int h = height + offY;
GrayU8 img = new GrayU8(w, h);
ImageMiscOps.fillUniform(img, new Random(0xfeed), 0, 100);
GrayS16 derivX = new GrayS16(w, h);
GrayS16 derivY = new GrayS16(w, h);
GrayS16 derivX2 = new GrayS16(w, h);
GrayS16 derivY2 = new GrayS16(w, h);
GradientSobel_Naive.process(img, derivX2, derivY2);
GradientSobel_Outer.process_I8(img, derivX, derivY);
BoofTesting.assertEquals(derivX2, derivX, 0);
BoofTesting.assertEquals(derivY2, derivY, 0);
}
}
}
Aggregations