use of boofcv.struct.image.GrayS8 in project BoofCV by lessthanoptimal.
the class TestHysteresisEdgeTraceMark method test2.
@Test
public void test2() {
GrayS8 dir = direction(2);
GrayU8 out = new GrayU8(dir.width, dir.height);
HysteresisEdgeTraceMark alg = new HysteresisEdgeTraceMark();
alg.process(intensity(2), dir, 3, 5, out);
assertEquals(3, ImageStatistics.sum(out));
alg.process(intensity(2), dir, 2, 5, out);
assertEquals(4, ImageStatistics.sum(out));
}
use of boofcv.struct.image.GrayS8 in project BoofCV by lessthanoptimal.
the class TestImplEdgeNonMaxSuppression method naive4_equal.
/**
* Make sure it suppresses values of equal intensity
*/
@Test
public void naive4_equal() {
GrayF32 intensity = new GrayF32(3, 3);
GrayF32 output = new GrayF32(3, 3);
GrayS8 direction = new GrayS8(3, 3);
GImageMiscOps.fill(intensity, 2);
ImplEdgeNonMaxSuppression.naive4(intensity, direction, output);
for (int i = 0; i < output.data.length; i++) assertEquals(2, output.data[i], 1e-4f);
}
use of boofcv.struct.image.GrayS8 in project BoofCV by lessthanoptimal.
the class TestImplEdgeNonMaxSuppression method naive8_equal.
/**
* Make sure it suppresses values of equal intensity
*/
@Test
public void naive8_equal() {
GrayF32 intensity = new GrayF32(3, 3);
GrayF32 output = new GrayF32(3, 3);
GrayS8 direction = new GrayS8(3, 3);
GImageMiscOps.fill(intensity, 2);
ImplEdgeNonMaxSuppression.naive8(intensity, direction, output);
for (int i = 0; i < output.data.length; i++) assertEquals(2, output.data[i], 1e-4f);
}
use of boofcv.struct.image.GrayS8 in project BoofCV by lessthanoptimal.
the class TestImplEdgeNonMaxSuppression method inner4.
@Test
public void inner4() {
GrayF32 intensity = new GrayF32(width, height);
GrayS8 direction = new GrayS8(width, height);
GrayF32 expected = new GrayF32(width, height);
GrayF32 found = new GrayF32(width, height);
BoofTesting.checkSubImage(this, "inner4", true, intensity, direction, expected, found);
}
use of boofcv.struct.image.GrayS8 in project BoofCV by lessthanoptimal.
the class TestImplEdgeNonMaxSuppression method border8.
@Test
public void border8() {
GrayF32 intensity = new GrayF32(width, height);
GrayS8 direction = new GrayS8(width, height);
GrayF32 expected = new GrayF32(width, height);
GrayF32 found = new GrayF32(width, height);
BoofTesting.checkSubImage(this, "border8", true, intensity, direction, expected, found);
}
Aggregations