use of boofcv.alg.distort.pinhole.LensDistortionPinhole 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();
}
Aggregations