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