Search in sources :

Example 1 with GeoLL_F64

use of boofcv.struct.geo.GeoLL_F64 in project BoofCV by lessthanoptimal.

the class TestCylinderToEquirectangular_F64 method checkFOV.

/**
 * Make sure the requested VFOV is the actual
 */
@Test
public void checkFOV() {
    CylinderToEquirectangular_F64 alg = new CylinderToEquirectangular_F64();
    alg.setEquirectangularShape(400, 500);
    alg.configure(200, 300, UtilAngle.radian(100));
    GeoLL_F64 ll = new GeoLL_F64();
    alg.compute(100, 0);
    alg.getTools().equiToLatLon(alg.distX, alg.distY, ll);
    double lat0 = ll.lat;
    alg.compute(100, 299);
    alg.getTools().equiToLatLon(alg.distX, alg.distY, ll);
    double lat1 = ll.lat;
    assertEquals(UtilAngle.radian(100), lat1 - lat0, GrlConstants.TEST_F64);
}
Also used : GeoLL_F64(boofcv.struct.geo.GeoLL_F64) Test(org.junit.Test)

Example 2 with GeoLL_F64

use of boofcv.struct.geo.GeoLL_F64 in project BoofCV by lessthanoptimal.

the class TestEquirectangularTools_F64 method equiToLonlatFV_reverse.

private void equiToLonlatFV_reverse(EquirectangularTools_F64 tools, double x, double y) {
    GeoLL_F64 ll = new GeoLL_F64();
    Point2D_F64 r = new Point2D_F64();
    tools.equiToLatLonFV(x, y, ll);
    tools.latlonToEquiFV(ll.lat, ll.lon, r);
    assertEquals(x, r.x, GrlConstants.TEST_F64);
    assertEquals(y, r.y, GrlConstants.TEST_F64);
}
Also used : Point2D_F64(georegression.struct.point.Point2D_F64) GeoLL_F64(boofcv.struct.geo.GeoLL_F64)

Example 3 with GeoLL_F64

use of boofcv.struct.geo.GeoLL_F64 in project BoofCV by lessthanoptimal.

the class TestEquirectangularTools_F64 method equiToLonlat_reverse.

private void equiToLonlat_reverse(EquirectangularTools_F64 tools, double x, double y) {
    GeoLL_F64 ll = new GeoLL_F64();
    Point2D_F64 r = new Point2D_F64();
    tools.equiToLatLon(x, y, ll);
    tools.latlonToEqui(ll.lat, ll.lon, r);
    assertEquals(x, r.x, GrlConstants.TEST_F64);
    assertEquals(y, r.y, GrlConstants.TEST_F64);
}
Also used : Point2D_F64(georegression.struct.point.Point2D_F64) GeoLL_F64(boofcv.struct.geo.GeoLL_F64)

Aggregations

GeoLL_F64 (boofcv.struct.geo.GeoLL_F64)3 Point2D_F64 (georegression.struct.point.Point2D_F64)2 Test (org.junit.Test)1