Search in sources :

Example 6 with LensDistortionUniversalOmni

use of boofcv.alg.distort.universal.LensDistortionUniversalOmni in project BoofCV by lessthanoptimal.

the class DisplayFisheyeCalibrationPanel method setCalibration.

public void setCalibration(CameraUniversalOmni fisheyeModel) {
    BoofSwingUtil.checkGuiThread();
    LensDistortionNarrowFOV pinholeDistort = new LensDistortionPinhole(pinholeModel);
    fisheyeDistort = new LensDistortionUniversalOmni(fisheyeModel);
    distorter = new NarrowToWidePtoP_F32(pinholeDistort, fisheyeDistort);
    // Create the image distorter which will render the image
    InterpolatePixel<Planar<GrayF32>> interp = FactoryInterpolation.createPixel(0, 255, InterpolationType.BILINEAR, BorderType.ZERO, imageFisheye.getImageType());
    distortImage = FactoryDistort.distort(false, interp, imageFisheye.getImageType());
    // Pass in the transform created above
    distortImage.setModel(new PointToPixelTransform_F32(distorter));
    setPinholeCenter(fisheyeModel.width / 2, fisheyeModel.height / 2);
    renderPinhole();
}
Also used : LensDistortionPinhole(boofcv.alg.distort.pinhole.LensDistortionPinhole) Planar(boofcv.struct.image.Planar) LensDistortionUniversalOmni(boofcv.alg.distort.universal.LensDistortionUniversalOmni)

Example 7 with LensDistortionUniversalOmni

use of boofcv.alg.distort.universal.LensDistortionUniversalOmni 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

LensDistortionUniversalOmni (boofcv.alg.distort.universal.LensDistortionUniversalOmni)7 CameraUniversalOmni (boofcv.struct.calib.CameraUniversalOmni)5 LensDistortionPinhole (boofcv.alg.distort.pinhole.LensDistortionPinhole)3 Planar (boofcv.struct.image.Planar)3 File (java.io.File)3 LensDistortionWideFOV (boofcv.alg.distort.LensDistortionWideFOV)2 ConvertBufferedImage (boofcv.io.image.ConvertBufferedImage)2 GrayU8 (boofcv.struct.image.GrayU8)2 BufferedImage (java.awt.image.BufferedImage)2 MultiCameraToEquirectangular (boofcv.alg.distort.spherical.MultiCameraToEquirectangular)1 ListDisplayPanel (boofcv.gui.ListDisplayPanel)1 CameraPinhole (boofcv.struct.calib.CameraPinhole)1 GrayF32 (boofcv.struct.image.GrayF32)1 Se3_F32 (georegression.struct.se.Se3_F32)1 ArrayList (java.util.ArrayList)1 FMatrixRMaj (org.ejml.data.FMatrixRMaj)1