Search in sources :

Example 46 with Point4D_F64

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

the class GeneralCheckNViewsTriangulateMetric method pointAtInfinity.

@Test
void pointAtInfinity() {
    this.createScene(new Point4D_F64(0.1, -0.2, 4.0, 0.0));
    Point3D_F64 found = new Point3D_F64();
    // the point is at infinity so failing is acceptable
    if (!triangulate(obsNorm, motionWorldToCamera, essential, found))
        return;
    // it could pass but have a very very large number
    assertTrue(found.z > 1e15);
}
Also used : Point3D_F64(georegression.struct.point.Point3D_F64) Point4D_F64(georegression.struct.point.Point4D_F64) Test(org.junit.jupiter.api.Test)

Example 47 with Point4D_F64

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

the class GeneralCheckNViewsTriangulateProjective method pointAtInfinity.

@Test
void pointAtInfinity() {
    this.createScene(new Point4D_F64(0.1, -0.2, 4.0, 0.0));
    Point4D_F64 found = new Point4D_F64();
    assertTrue(triangulate(obsPixels, cameraMatrices, essential, found));
    assertEquals(0.0, PerspectiveOps.distance(worldPointH, found), UtilEjml.TEST_F64);
}
Also used : Point4D_F64(georegression.struct.point.Point4D_F64) Test(org.junit.jupiter.api.Test)

Example 48 with Point4D_F64

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

the class GeneralCheckNViewsTriangulateProjective method perfectInput.

@Test
void perfectInput() {
    createScene();
    Point4D_F64 found = new Point4D_F64();
    assertTrue(triangulate(obsPixels, cameraMatrices, essential, found));
    assertEquals(0.0, worldPoint.distance(convertH(found)), UtilEjml.TEST_F64_SQ);
}
Also used : Point4D_F64(georegression.struct.point.Point4D_F64) Test(org.junit.jupiter.api.Test)

Example 49 with Point4D_F64

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

the class GeneralCheckNViewsTriangulateMetricH method pointAtInfinity.

@Test
void pointAtInfinity() {
    this.createScene(new Point4D_F64(0.1, -0.2, 4.0, 0.0));
    Point4D_F64 found = new Point4D_F64();
    assertTrue(triangulate(obsNorm, motionWorldToCamera, essential, found));
    assertEquals(0.0, PerspectiveOps.distance(worldPointH, found), UtilEjml.TEST_F64);
}
Also used : Point4D_F64(georegression.struct.point.Point4D_F64) Test(org.junit.jupiter.api.Test)

Example 50 with Point4D_F64

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

the class GeneralCheckNViewsTriangulateMetricH method perfectInput.

@Test
void perfectInput() {
    createScene();
    Point4D_F64 found = new Point4D_F64();
    assertTrue(triangulate(obsNorm, motionWorldToCamera, essential, found));
    assertEquals(0.0, worldPoint.distance(convertH(found)), UtilEjml.TEST_F64_SQ);
}
Also used : Point4D_F64(georegression.struct.point.Point4D_F64) Test(org.junit.jupiter.api.Test)

Aggregations

Point4D_F64 (georegression.struct.point.Point4D_F64)57 Point2D_F64 (georegression.struct.point.Point2D_F64)25 Test (org.junit.jupiter.api.Test)25 DMatrixRMaj (org.ejml.data.DMatrixRMaj)19 Point3D_F64 (georegression.struct.point.Point3D_F64)12 Se3_F64 (georegression.struct.se.Se3_F64)11 ArrayList (java.util.ArrayList)9 SceneObservations (boofcv.abst.geo.bundle.SceneObservations)5 SceneStructureProjective (boofcv.abst.geo.bundle.SceneStructureProjective)5 SceneStructureCommon (boofcv.abst.geo.bundle.SceneStructureCommon)4 AssociatedTriple (boofcv.struct.geo.AssociatedTriple)4 DogArray_I32 (org.ddogleg.struct.DogArray_I32)4 SceneStructureMetric (boofcv.abst.geo.bundle.SceneStructureMetric)3 CameraPinhole (boofcv.struct.calib.CameraPinhole)3 AssociatedPair (boofcv.struct.geo.AssociatedPair)3 UtilPoint4D_F64 (georegression.geometry.UtilPoint4D_F64)3 DogArray (org.ddogleg.struct.DogArray)3 TriangulateNViewsMetricH (boofcv.abst.geo.TriangulateNViewsMetricH)2 RemoveBrownPtoN_F64 (boofcv.alg.distort.brown.RemoveBrownPtoN_F64)2 BundlePinhole (boofcv.alg.geo.bundle.cameras.BundlePinhole)2