Search in sources :

Example 36 with GrayU8

use of boofcv.struct.image.GrayU8 in project BoofCV by lessthanoptimal.

the class TestBinaryNaiveOps method edge4_border.

@Test
public void edge4_border() {
    GrayU8 input;
    input = createInput(0, 1, 0, 1, 1, 1, 0, 1, 0);
    checkImage("edge4", input, 0, 1, 0, 1, 0, 1, 0, 1, 0);
    input = createInput(1, 1, 1, 1, 1, 1, 1, 1, 1);
    checkImage("edge4", input, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
Also used : GrayU8(boofcv.struct.image.GrayU8) Test(org.junit.Test)

Example 37 with GrayU8

use of boofcv.struct.image.GrayU8 in project BoofCV by lessthanoptimal.

the class TestBinaryNaiveOps method edge8.

@Test
public void edge8() {
    GrayU8 input;
    input = createInput(0, 0, 0, 0, 1, 0, 0, 0, 0);
    checkOutput("edge8", input, 1);
    input = createInput(0, 1, 0, 0, 1, 0, 0, 0, 0);
    checkOutput("edge8", input, 1);
    input = createInput(1, 0, 1, 0, 1, 0, 1, 0, 1);
    checkOutput("edge8", input, 1);
    input = createInput(1, 1, 0, 1, 1, 1, 1, 1, 1);
    checkOutput("edge8", input, 1);
    input = createInput(0, 0, 0, 0, 0, 0, 0, 0, 0);
    checkOutput("edge8", input, 0);
    input = createInput(1, 1, 1, 1, 1, 1, 1, 1, 1);
    checkOutput("edge8", input, 0);
}
Also used : GrayU8(boofcv.struct.image.GrayU8) Test(org.junit.Test)

Example 38 with GrayU8

use of boofcv.struct.image.GrayU8 in project BoofCV by lessthanoptimal.

the class TestBinaryNaiveOps method dilate4.

@Test
public void dilate4() {
    GrayU8 input;
    input = createInput(0, 1, 0, 1, 1, 1, 0, 1, 0);
    checkOutput("dilate4", input, 1);
    input = createInput(0, 0, 0, 0, 1, 0, 0, 0, 0);
    checkOutput("dilate4", input, 1);
    input = createInput(0, 0, 0, 1, 0, 0, 0, 0, 0);
    checkOutput("dilate4", input, 1);
    input = createInput(0, 1, 0, 0, 0, 0, 0, 1, 0);
    checkOutput("dilate4", input, 1);
    input = createInput(0, 0, 0, 0, 0, 0, 0, 0, 0);
    checkOutput("dilate4", input, 0);
    input = createInput(1, 0, 1, 0, 0, 0, 1, 0, 1);
    checkOutput("dilate4", input, 0);
}
Also used : GrayU8(boofcv.struct.image.GrayU8) Test(org.junit.Test)

Example 39 with GrayU8

use of boofcv.struct.image.GrayU8 in project BoofCV by lessthanoptimal.

the class TestBinaryNaiveOps method edge4.

@Test
public void edge4() {
    GrayU8 input;
    input = createInput(0, 0, 0, 0, 1, 0, 0, 0, 0);
    checkOutput("edge4", input, 1);
    input = createInput(0, 1, 0, 0, 1, 0, 0, 0, 0);
    checkOutput("edge4", input, 1);
    input = createInput(0, 0, 0, 1, 1, 1, 0, 0, 0);
    checkOutput("edge4", input, 1);
    input = createInput(0, 0, 0, 0, 1, 0, 0, 1, 0);
    checkOutput("edge4", input, 1);
    input = createInput(0, 0, 0, 0, 0, 0, 0, 0, 0);
    checkOutput("edge4", input, 0);
    input = createInput(1, 1, 1, 1, 1, 1, 1, 1, 1);
    checkOutput("edge4", input, 0);
    input = createInput(0, 1, 0, 1, 1, 1, 0, 1, 0);
    checkOutput("edge4", input, 0);
    input = createInput(0, 0, 0, 1, 0, 1, 0, 0, 0);
    checkOutput("edge4", input, 0);
}
Also used : GrayU8(boofcv.struct.image.GrayU8) Test(org.junit.Test)

Example 40 with GrayU8

use of boofcv.struct.image.GrayU8 in project BoofCV by lessthanoptimal.

the class TestBinaryNaiveOps method erode8_border.

@Test
public void erode8_border() {
    GrayU8 input;
    input = createInput(1, 1, 1, 1, 1, 1, 1, 1, 1);
    checkImage("erode8", input, 1, 1, 1, 1, 1, 1, 1, 1, 1);
    input = createInput(0, 1, 0, 1, 1, 1, 0, 1, 0);
    checkImage("erode8", input, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
Also used : GrayU8(boofcv.struct.image.GrayU8) Test(org.junit.Test)

Aggregations

GrayU8 (boofcv.struct.image.GrayU8)417 Test (org.junit.Test)242 BufferedImage (java.awt.image.BufferedImage)53 GrayS32 (boofcv.struct.image.GrayS32)52 GrayF32 (boofcv.struct.image.GrayF32)49 ConvertBufferedImage (boofcv.io.image.ConvertBufferedImage)48 GrayS16 (boofcv.struct.image.GrayS16)45 Planar (boofcv.struct.image.Planar)28 ArrayList (java.util.ArrayList)22 File (java.io.File)17 ListDisplayPanel (boofcv.gui.ListDisplayPanel)16 RectangleLength2D_I32 (georegression.struct.shapes.RectangleLength2D_I32)16 ImageGray (boofcv.struct.image.ImageGray)15 EllipseRotated_F64 (georegression.struct.curve.EllipseRotated_F64)15 Random (java.util.Random)14 Point2D_F64 (georegression.struct.point.Point2D_F64)11 ImageRectangle (boofcv.struct.ImageRectangle)10 GrayU16 (boofcv.struct.image.GrayU16)10 Se3_F64 (georegression.struct.se.Se3_F64)10 Point3D_F64 (georegression.struct.point.Point3D_F64)9