Search in sources :

Example 21 with Rectangle2D_I32

use of georegression.struct.shapes.Rectangle2D_I32 in project BoofCV by lessthanoptimal.

the class TestTldHelperFunctions method convertRegion_I32_F32.

@Test
void convertRegion_I32_F32() {
    Rectangle2D_F64 a = new Rectangle2D_F64();
    Rectangle2D_I32 b = new Rectangle2D_I32();
    b.setTo(10, 12, 11, 61);
    TldHelperFunctions.convertRegion(b, a);
    assertEquals(10, a.p0.x, 1e-8);
    assertEquals(12, a.p0.y, 1e-8);
    assertEquals(11, a.p1.x, 1e-8);
    assertEquals(61, a.p1.y, 1e-8);
}
Also used : Rectangle2D_F64(georegression.struct.shapes.Rectangle2D_F64) Rectangle2D_I32(georegression.struct.shapes.Rectangle2D_I32) Test(org.junit.jupiter.api.Test)

Aggregations

Rectangle2D_I32 (georegression.struct.shapes.Rectangle2D_I32)21 Test (org.junit.jupiter.api.Test)17 Polygon2D_F64 (georegression.struct.shapes.Polygon2D_F64)6 Affine2D_F64 (georegression.struct.affine.Affine2D_F64)3 Rectangle2D_F64 (georegression.struct.shapes.Rectangle2D_F64)3 Se2_F64 (georegression.struct.se.Se2_F64)2 FDistort (boofcv.abst.distort.FDistort)1 ListDisplayPanel (boofcv.gui.ListDisplayPanel)1 PointIndex_I32 (boofcv.struct.PointIndex_I32)1 Polygon2D_I32 (georegression.struct.shapes.Polygon2D_I32)1 Term (nars.term.Term)1