Search in sources :

Example 16 with GrayS8

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));
}
Also used : GrayS8(boofcv.struct.image.GrayS8) GrayU8(boofcv.struct.image.GrayU8) Test(org.junit.Test)

Example 17 with GrayS8

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);
}
Also used : GrayF32(boofcv.struct.image.GrayF32) GrayS8(boofcv.struct.image.GrayS8) Test(org.junit.Test)

Example 18 with GrayS8

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);
}
Also used : GrayF32(boofcv.struct.image.GrayF32) GrayS8(boofcv.struct.image.GrayS8) Test(org.junit.Test)

Example 19 with GrayS8

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);
}
Also used : GrayF32(boofcv.struct.image.GrayF32) GrayS8(boofcv.struct.image.GrayS8) Test(org.junit.Test)

Example 20 with GrayS8

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);
}
Also used : GrayF32(boofcv.struct.image.GrayF32) GrayS8(boofcv.struct.image.GrayS8) Test(org.junit.Test)

Aggregations

GrayS8 (boofcv.struct.image.GrayS8)21 GrayF32 (boofcv.struct.image.GrayF32)16 Test (org.junit.Test)16 GrayU8 (boofcv.struct.image.GrayU8)5 DescribeRegionPoint (boofcv.abst.feature.describe.DescribeRegionPoint)2 ConvertBufferedImage (boofcv.io.image.ConvertBufferedImage)2 Planar (boofcv.struct.image.Planar)2 BufferedImage (java.awt.image.BufferedImage)2 HysteresisEdgeTraceMark (boofcv.alg.feature.detect.edge.HysteresisEdgeTraceMark)1 ConnectLinesGrid (boofcv.alg.feature.detect.line.ConnectLinesGrid)1 Edgel (boofcv.alg.feature.detect.line.gridline.Edgel)1 GridLineModelDistance (boofcv.alg.feature.detect.line.gridline.GridLineModelDistance)1 GridLineModelFitter (boofcv.alg.feature.detect.line.gridline.GridLineModelFitter)1 ImplGridRansacLineDetector_F32 (boofcv.alg.feature.detect.line.gridline.ImplGridRansacLineDetector_F32)1 ListDisplayPanel (boofcv.gui.ListDisplayPanel)1 ImageLinePanel (boofcv.gui.feature.ImageLinePanel)1 ModelManagerLinePolar2D_F32 (georegression.fitting.line.ModelManagerLinePolar2D_F32)1 LinePolar2D_F32 (georegression.struct.line.LinePolar2D_F32)1 LineSegment2D_F32 (georegression.struct.line.LineSegment2D_F32)1 Ransac (org.ddogleg.fitting.modelset.ransac.Ransac)1