Search in sources :

Example 86 with Point2D_F32

use of georegression.struct.point.Point2D_F32 in project BoofCV by lessthanoptimal.

the class TestFlipVerticalNorm_F32 method theSuperDuperTest.

@Test
public void theSuperDuperTest() {
    FlipVerticalNorm2_F32 alg = new FlipVerticalNorm2_F32(new Dummy(), 1);
    Point2D_F32 out = new Point2D_F32();
    alg.compute(2, 3, out);
    assertEquals(2, out.x, 1e-8);
    assertEquals(3, -out.y, 1e-8);
}
Also used : Point2D_F32(georegression.struct.point.Point2D_F32) Test(org.junit.Test)

Example 87 with Point2D_F32

use of georegression.struct.point.Point2D_F32 in project BoofCV by lessthanoptimal.

the class ImageDistortCache_SB method renderAll.

public void renderAll() {
    // then do the slower border thingy
    for (int y = y0; y < y1; y++) {
        int indexDst = dstImg.startIndex + dstImg.stride * y + x0;
        for (int x = x0; x < x1; x++, indexDst++) {
            Point2D_F32 s = map[indexDst];
            assign(indexDst, interp.get(s.x, s.y));
        }
    }
}
Also used : Point2D_F32(georegression.struct.point.Point2D_F32)

Example 88 with Point2D_F32

use of georegression.struct.point.Point2D_F32 in project BoofCV by lessthanoptimal.

the class PixelTransformCached_F32 method compute.

@Override
public void compute(int x, int y) {
    // if( x < 0 || y < 0 || x >= width || y >= height )
    // throw new IllegalArgumentException("Out of bounds");
    Point2D_F32 p = map[y * width + x];
    distX = p.x;
    distY = p.y;
}
Also used : Point2D_F32(georegression.struct.point.Point2D_F32)

Example 89 with Point2D_F32

use of georegression.struct.point.Point2D_F32 in project BoofCV by lessthanoptimal.

the class TestPixelDistortAffine_F32 method constructor_32.

@Test
public void constructor_32() {
    Affine2D_F32 a = new Affine2D_F32(1, 2, 3, 4, 5, 6);
    PixelTransformAffine_F32 alg = new PixelTransformAffine_F32();
    alg.set(a);
    alg.compute(2, 3);
    Point2D_F32 p = new Point2D_F32(2, 3);
    Point2D_F32 expected = new Point2D_F32();
    AffinePointOps_F32.transform(a, p, expected);
    assertEquals(expected.x, alg.distX, 1e-4);
    assertEquals(expected.y, alg.distY, 1e-4);
}
Also used : Affine2D_F32(georegression.struct.affine.Affine2D_F32) Point2D_F32(georegression.struct.point.Point2D_F32) Test(org.junit.Test)

Example 90 with Point2D_F32

use of georegression.struct.point.Point2D_F32 in project BoofCV by lessthanoptimal.

the class TestPixelTransformHomography_F32 method constructor_32.

@Test
public void constructor_32() {
    Homography2D_F32 a = new Homography2D_F32(1, 2, 3, 4, 5, 6, 7, 8, 9);
    PixelTransformHomography_F32 alg = new PixelTransformHomography_F32();
    alg.set(a);
    alg.compute(2, 3);
    Point2D_F32 p = new Point2D_F32(2, 3);
    Point2D_F32 expected = new Point2D_F32();
    HomographyPointOps_F32.transform(a, p, expected);
    assertEquals(expected.x, alg.distX, 1e-4);
    assertEquals(expected.y, alg.distY, 1e-4);
}
Also used : Homography2D_F32(georegression.struct.homography.Homography2D_F32) Point2D_F32(georegression.struct.point.Point2D_F32) Test(org.junit.Test)

Aggregations

Point2D_F32 (georegression.struct.point.Point2D_F32)98 Test (org.junit.Test)36 Point3D_F32 (georegression.struct.point.Point3D_F32)10 Point2Transform2_F32 (boofcv.struct.distort.Point2Transform2_F32)9 LineSegment2D_F32 (georegression.struct.line.LineSegment2D_F32)8 ArrayList (java.util.ArrayList)8 Point2D_F64 (georegression.struct.point.Point2D_F64)7 FMatrixRMaj (org.ejml.data.FMatrixRMaj)7 CameraPinholeRadial (boofcv.struct.calib.CameraPinholeRadial)5 LineParametric2D_F32 (georegression.struct.line.LineParametric2D_F32)5 Point2Transform3_F32 (boofcv.struct.distort.Point2Transform3_F32)4 Point3Transform2_F32 (boofcv.struct.distort.Point3Transform2_F32)4 GrayF32 (boofcv.struct.image.GrayF32)4 ClosestPoint2D_F32 (georegression.metric.ClosestPoint2D_F32)4 PointToPixelTransform_F32 (boofcv.alg.distort.PointToPixelTransform_F32)3 CameraPinhole (boofcv.struct.calib.CameraPinhole)3 GrayU8 (boofcv.struct.image.GrayU8)3 PixelTransformCached_F32 (boofcv.alg.distort.PixelTransformCached_F32)2 PinholePtoN_F32 (boofcv.alg.distort.pinhole.PinholePtoN_F32)2 CalibrationObservation (boofcv.alg.geo.calibration.CalibrationObservation)2