public void configure(LensDistortionNarrowFOV narrow, LensDistortionWideFOV wide) { narrowToNorm = narrow.undistort_F64(true,false); unitToWide = wide.distortStoP_F64(); }
@Override public void apply(Input srcImg, Output dstImg) { init(srcImg, dstImg); x0 = 0;y0 = 0;x1 = dstImg.width;y1 = dstImg.height; if(renderAll) applyAll(); else applyOnlyInside(); }
@Override public void apply(Input srcImg, Output dstImg, GrayU8 mask) { init(srcImg, dstImg); x0 = 0;y0 = 0;x1 = dstImg.width;y1 = dstImg.height; if( renderAll ) renderAll(mask); else applyOnlyInside(mask); }
public static void fullViewLeft(int imageWidth,int imageHeight, FMatrixRMaj rectifyLeft, FMatrixRMaj rectifyRight ) { Point2Transform2_F32 tranLeft = new PointTransformHomography_F32(rectifyLeft); RectangleLength2D_F32 bound = DistortImageOps.boundBox_F32(imageWidth, imageHeight, new PointToPixelTransform_F32(tranLeft)); float scaleX = imageWidth/bound.width; float scaleY = imageHeight/bound.height; float scale = (float)Math.min(scaleX,scaleY); adjustUncalibrated(rectifyLeft, rectifyRight, bound, scale); }
public static void allInsideLeft( int imageWidth,int imageHeight, FMatrixRMaj rectifyLeft, FMatrixRMaj rectifyRight ) { PointTransformHomography_F32 tranLeft = new PointTransformHomography_F32(rectifyLeft); RectangleLength2D_F32 bound = LensDistortionOps_F32.boundBoxInside(imageWidth, imageHeight, new PointToPixelTransform_F32(tranLeft)); float scaleX = imageWidth/(float)bound.width; float scaleY = imageHeight/(float)bound.height; float scale = (float)Math.max(scaleX, scaleY); adjustUncalibrated(rectifyLeft, rectifyRight, bound, scale); }
/** * Specifies the intrinsic parameters. * @param distortion Intrinsic camera parameters */ public void setLensDistoriton(LensDistortionNarrowFOV distortion ) { pixelToNorm = distortion.undistort_F64(true,false); normToPixel = distortion.distort_F64(false, true); }
@Override public void setModel(PixelTransform2_F32 dstToSrc) { layerDistort.setModel(dstToSrc); }
public void configure(LensDistortionNarrowFOV narrow, LensDistortionWideFOV wide) { narrowToNorm = narrow.undistort_F32(true,false); unitToWide = wide.distortStoP_F32(); }
public static void allInsideLeft( int imageWidth,int imageHeight, DMatrixRMaj rectifyLeft, DMatrixRMaj rectifyRight ) { PointTransformHomography_F64 tranLeft = new PointTransformHomography_F64(rectifyLeft); RectangleLength2D_F64 bound = LensDistortionOps_F64.boundBoxInside(imageWidth, imageHeight, new PointToPixelTransform_F64(tranLeft)); double scaleX = imageWidth/(double)bound.width; double scaleY = imageHeight/(double)bound.height; double scale = Math.max(scaleX, scaleY); adjustUncalibrated(rectifyLeft, rectifyRight, bound, scale); }
/** * Specifies intrinsic camera parameters and the transform from world to camera. * @param distortion camera parameters * @param worldToCamera transform from world to camera */ public void configure(LensDistortionNarrowFOV distortion , Se3_F64 worldToCamera ) { this.worldToCamera = worldToCamera; normToPixel = distortion.distort_F64(false,true); }
@Override public void setLensDistortion(LensDistortionNarrowFOV distortion) { if( distortion != null ) { this.hasCameraModel = true; this.lensDistortion = distortion; this.pixelToNorm = lensDistortion.undistort_F64(true, false); } else { this.hasCameraModel = false; this.lensDistortion = null; this.pixelToNorm = null; } }
public NarrowToWidePtoP_F64(LensDistortionNarrowFOV narrow, LensDistortionWideFOV wide) { configure(narrow, wide); }
@Override public PixelTransform2_F32 getModel() { return layerDistort.getModel(); } }
public void configure(LensDistortionNarrowFOV narrow, LensDistortionWideFOV wide) { narrowToNorm = narrow.undistort_F64(true,false); unitToWide = wide.distortStoP_F64(); }
public void configure(LensDistortionNarrowFOV narrow, LensDistortionWideFOV wide) { narrowToNorm = narrow.undistort_F32(true,false); unitToWide = wide.distortStoP_F32(); }
/** * Specifies intrinsic camera parameters and the transform from world to camera. * @param distortion camera parameters * @param worldToCamera transform from world to camera */ public void configure(LensDistortionNarrowFOV distortion , Se3_F64 worldToCamera ) { this.worldToCamera = worldToCamera; normToPixel = distortion.distort_F64(false,true); }
@Override public void apply(Input srcImg, Output dstImg, int dstX0, int dstY0, int dstX1, int dstY1) { init(srcImg, dstImg); x0 = dstX0;y0 = dstY0;x1 = dstX1;y1 = dstY1; if(renderAll) applyAll(); else applyOnlyInside(); }
@Override public void apply(Input srcImg, Output dstImg, int dstX0, int dstY0, int dstX1, int dstY1) { init(srcImg, dstImg); x0 = dstX0;y0 = dstY0;x1 = dstX1;y1 = dstY1; if( renderAll ) renderAll(); else applyOnlyInside(); }
@Override public void apply(Input srcImg, Output dstImg, GrayU8 mask ) { init(srcImg, dstImg); x0 = 0;y0 = 0;x1 = dstImg.width;y1 = dstImg.height; if(renderAll) applyAll(mask); else applyOnlyInside(mask); }
@Override public void apply(Input srcImg, Output dstImg) { init(srcImg, dstImg); x0 = 0;y0 = 0;x1 = dstImg.width;y1 = dstImg.height; if( renderAll ) renderAll(); else applyOnlyInside(); }