use of boofcv.struct.calib.CameraUniversalOmni in project BoofCV by lessthanoptimal.
the class TestUniOmniPtoS_F64 method centerIsCenter.
private void centerIsCenter(double mirror) {
CameraUniversalOmni model = createModel(mirror);
UniOmniPtoS_F64 alg = new UniOmniPtoS_F64();
alg.setModel(model);
Point3D_F64 found = new Point3D_F64(10, 10, 10);
// directly forward on unit sphere
alg.compute(320, 240, found);
assertEquals(0, found.x, GrlConstants.TEST_F64);
assertEquals(0, found.y, GrlConstants.TEST_F64);
assertEquals(1, found.z, GrlConstants.TEST_F64);
}
use of boofcv.struct.calib.CameraUniversalOmni in project BoofCV by lessthanoptimal.
the class TestUniOmniPtoS_F64 method createModel.
public static CameraUniversalOmni createModel(double mirror) {
CameraUniversalOmni model = new CameraUniversalOmni(2);
model.fsetK(400, 405, 0.01, 320, 240, 640, 480);
model.fsetMirror(mirror);
model.fsetRadial(0.01, -0.03);
model.fsetTangental(0.001, 0.002);
return model;
}
use of boofcv.struct.calib.CameraUniversalOmni in project BoofCV by lessthanoptimal.
the class TestUniOmniStoP_F32 method worldIsImageCenter.
/**
* A point in the world center should appear in the image center
*/
@Test
public void worldIsImageCenter() {
CameraUniversalOmni model = createModel(0.5f);
UniOmniStoP_F32 alg = new UniOmniStoP_F32();
alg.setModel(model);
Point2D_F32 found = new Point2D_F32(10, 10);
// directly forward on unit sphere
alg.compute(0, 0, 1, found);
assertEquals(320, found.x, GrlConstants.TEST_F32);
assertEquals(240, found.y, GrlConstants.TEST_F32);
}
use of boofcv.struct.calib.CameraUniversalOmni in project BoofCV by lessthanoptimal.
the class TestNarrowToWidePtoP_F32 method createModelWide.
public static LensDistortionWideFOV createModelWide() {
CameraUniversalOmni model = new CameraUniversalOmni(2);
model.fsetK(1.349e3f, 1.343e3f, 0, 480, 480, 960, 1080);
model.fsetMirror(3.61f);
model.fsetRadial(7.308e-1f, 1.855e1f);
model.fsetTangental(-1.288e-2f, -1.1342e-2f);
return new LensDistortionUniversalOmni(model);
}
Aggregations