use of boofcv.struct.image.InterleavedU8 in project BoofCV by lessthanoptimal.
the class TestConvolveNormalizedNaive_IL method vertical.
/**
* Check it against one specific type to see if the core algorithm is correct
*/
@Test
public void vertical() {
Kernel1D_S32 kernel = new Kernel1D_S32(new int[] { 1, 2, 3, 4, 5, 6 }, 6, 4);
InterleavedU8 input = new InterleavedU8(width, height, numBands);
ImageMiscOps.fillUniform(input, rand, 0, 50);
InterleavedU8 output = new InterleavedU8(width, height, numBands);
ConvolveNormalizedNaive_IL.vertical(kernel, input, output);
for (int y = 0; y < output.height; y++) {
for (int x = 0; x < output.width; x++) {
for (int band = 0; band < numBands; band++) {
int expected = vertical(x, y, band, kernel, input);
int found = output.getBand(x, y, band);
assertEquals(x + " " + y, expected, found);
}
}
}
}
Aggregations