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);
}
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);
}
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);
}
Aggregations