Search in sources :

Example 16 with CameraUniversalOmni

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);
}
Also used : Point3D_F64(georegression.struct.point.Point3D_F64) CameraUniversalOmni(boofcv.struct.calib.CameraUniversalOmni)

Example 17 with CameraUniversalOmni

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;
}
Also used : CameraUniversalOmni(boofcv.struct.calib.CameraUniversalOmni)

Example 18 with CameraUniversalOmni

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);
}
Also used : CameraUniversalOmni(boofcv.struct.calib.CameraUniversalOmni) Point2D_F32(georegression.struct.point.Point2D_F32) Test(org.junit.Test)

Example 19 with CameraUniversalOmni

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);
}
Also used : CameraUniversalOmni(boofcv.struct.calib.CameraUniversalOmni) LensDistortionUniversalOmni(boofcv.alg.distort.universal.LensDistortionUniversalOmni)

Aggregations

CameraUniversalOmni (boofcv.struct.calib.CameraUniversalOmni)19 ConvertBufferedImage (boofcv.io.image.ConvertBufferedImage)6 GrayF32 (boofcv.struct.image.GrayF32)6 BufferedImage (java.awt.image.BufferedImage)6 File (java.io.File)6 LensDistortionUniversalOmni (boofcv.alg.distort.universal.LensDistortionUniversalOmni)5 ArrayList (java.util.ArrayList)5 Point2D_F64 (georegression.struct.point.Point2D_F64)3 Test (org.junit.Test)3 CalibrateMonoPlanar (boofcv.abst.geo.calibration.CalibrateMonoPlanar)2 DetectorFiducialCalibration (boofcv.abst.geo.calibration.DetectorFiducialCalibration)2 LensDistortionPinhole (boofcv.alg.distort.pinhole.LensDistortionPinhole)2 GrayU8 (boofcv.struct.image.GrayU8)2 Planar (boofcv.struct.image.Planar)2 Point2D_F32 (georegression.struct.point.Point2D_F32)2 Point3D_F32 (georegression.struct.point.Point3D_F32)2 Point3D_F64 (georegression.struct.point.Point3D_F64)2 Se3_F64 (georegression.struct.se.Se3_F64)2 ConfigChessboard (boofcv.abst.fiducial.calib.ConfigChessboard)1 LensDistortionWideFOV (boofcv.alg.distort.LensDistortionWideFOV)1