Search in sources :

Example 1 with GeoLL_F32

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

the class TestCylinderToEquirectangular_F32 method checkFOV.

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

Example 2 with GeoLL_F32

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

the class TestEquirectangularTools_F32 method equiToLonlat_reverse.

private void equiToLonlat_reverse(EquirectangularTools_F32 tools, float x, float y) {
    GeoLL_F32 ll = new GeoLL_F32();
    Point2D_F32 r = new Point2D_F32();
    tools.equiToLatLon(x, y, ll);
    tools.latlonToEqui(ll.lat, ll.lon, r);
    assertEquals(x, r.x, GrlConstants.TEST_F32);
    assertEquals(y, r.y, GrlConstants.TEST_F32);
}
Also used : GeoLL_F32(boofcv.struct.geo.GeoLL_F32) Point2D_F32(georegression.struct.point.Point2D_F32)

Example 3 with GeoLL_F32

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

the class TestEquirectangularTools_F32 method equiToLonlatFV_reverse.

private void equiToLonlatFV_reverse(EquirectangularTools_F32 tools, float x, float y) {
    GeoLL_F32 ll = new GeoLL_F32();
    Point2D_F32 r = new Point2D_F32();
    tools.equiToLatLonFV(x, y, ll);
    tools.latlonToEquiFV(ll.lat, ll.lon, r);
    assertEquals(x, r.x, GrlConstants.TEST_F32);
    assertEquals(y, r.y, GrlConstants.TEST_F32);
}
Also used : GeoLL_F32(boofcv.struct.geo.GeoLL_F32) Point2D_F32(georegression.struct.point.Point2D_F32)

Aggregations

GeoLL_F32 (boofcv.struct.geo.GeoLL_F32)3 Point2D_F32 (georegression.struct.point.Point2D_F32)2 Test (org.junit.Test)1