use of boofcv.struct.image.GrayS16 in project BoofCV by lessthanoptimal.
the class TestGradientSobel_Outer method process_I8_sub_naive.
@Test
public void process_I8_sub_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);
BoofTesting.checkSubImage(this, "process_I8_sub_naive", true, img, derivX, derivY);
}
}
}
use of boofcv.struct.image.GrayS16 in project BoofCV by lessthanoptimal.
the class TestGradientSobel_Outer method process_I8_sub_naive.
public void process_I8_sub_naive(GrayU8 img, GrayS16 derivX, GrayS16 derivY) {
GrayS16 derivX2 = new GrayS16(derivX.width, derivX.height);
GrayS16 derivY2 = new GrayS16(derivX.width, derivX.height);
GradientSobel_Naive.process(img, derivX2, derivY2);
GradientSobel_Outer.process_I8_sub(img, derivX, derivY);
BoofTesting.assertEquals(derivX2, derivX, 0);
BoofTesting.assertEquals(derivY2, derivY, 0);
}
use of boofcv.struct.image.GrayS16 in project BoofCV by lessthanoptimal.
the class TestGradientThree_Standard method compareToConvolve_I8_S16.
@Test
public void compareToConvolve_I8_S16() throws NoSuchMethodException {
CompareDerivativeToConvolution validator = new CompareDerivativeToConvolution();
validator.setTarget(GradientThree_Standard.class.getMethod("process", GrayU8.class, GrayS16.class, GrayS16.class));
validator.setKernel(0, GradientThree.kernelDeriv_I32, true);
validator.setKernel(1, GradientThree.kernelDeriv_I32, false);
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 TestGradientTwo0_Standard method compareToConvolve_I8.
@Test
public void compareToConvolve_I8() throws NoSuchMethodException {
CompareDerivativeToConvolution validator = new CompareDerivativeToConvolution();
validator.setTarget(GradientTwo0_Standard.class.getMethod("process", GrayU8.class, GrayS16.class, GrayS16.class));
validator.setKernel(0, GradientTwo0.kernelDeriv_I32, true);
validator.setKernel(1, GradientTwo0.kernelDeriv_I32, false);
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_UnrolledOuter method process_I8_naive.
/**
* See if the same results are returned by ImageByte2D equivalent
*/
@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_UnrolledOuter.process_I8(img, derivX, derivY);
BoofTesting.assertEquals(derivX2, derivX, 0);
BoofTesting.assertEquals(derivY2, derivY, 0);
}
}
}
Aggregations