Class LensDistortionOps_F32


  • public class LensDistortionOps_F32
    extends java.lang.Object
    Operations related to manipulating lens distortion in images
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static georegression.struct.shapes.RectangleLength2D_F32 boundBoxInside​(int srcWidth, int srcHeight, boofcv.struct.distort.PixelTransform<georegression.struct.point.Point2D_F32> transform, georegression.struct.point.Point2D_F32 work)
      Ensures that the entire box will be inside
      static georegression.struct.shapes.RectangleLength2D_F32 centerBoxInside​(int srcWidth, int srcHeight, boofcv.struct.distort.PixelTransform<georegression.struct.point.Point2D_F32> transform, georegression.struct.point.Point2D_F32 work)
      Attempts to center the box inside.
      static void roundInside​(georegression.struct.shapes.RectangleLength2D_F32 bound)
      Adjust bound to ensure the entire image is contained inside, otherwise there might be single pixel wide black regions
      static <O extends CameraPinhole,​D extends CameraPinhole>
      boofcv.struct.distort.Point2Transform2_F32
      transformChangeModel​(AdjustmentType type, O paramOriginal, D paramDesired, boolean desiredToOriginal, D paramMod)
      Creates a Point2Transform2_F32 for converting pixels from original camera model into a new synthetic model.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LensDistortionOps_F32

        public LensDistortionOps_F32()
    • Method Detail

      • transformChangeModel

        public static <O extends CameraPinhole,​D extends CameraPinhole> boofcv.struct.distort.Point2Transform2_F32 transformChangeModel​(AdjustmentType type,
                                                                                                                                              O paramOriginal,
                                                                                                                                              D paramDesired,
                                                                                                                                              boolean desiredToOriginal,
                                                                                                                                              D paramMod)
        Creates a Point2Transform2_F32 for converting pixels from original camera model into a new synthetic model. The scaling of the image can be adjusted to ensure certain visibility requirements.
        Parameters:
        type - The type of adjustment it will apply to the transform
        paramOriginal - Camera model for the current image
        paramDesired - Desired camera model for the distorted image
        desiredToOriginal - If true then the transform's input is assumed to be pixels in the desired image and the output will be in original image, if false then the reverse transform is returned.
        paramMod - The modified camera model to meet the requested visibility requirements. Null if you don't want it.
        Returns:
        The requested transform
      • boundBoxInside

        public static georegression.struct.shapes.RectangleLength2D_F32 boundBoxInside​(int srcWidth,
                                                                                       int srcHeight,
                                                                                       boofcv.struct.distort.PixelTransform<georegression.struct.point.Point2D_F32> transform,
                                                                                       georegression.struct.point.Point2D_F32 work)
        Ensures that the entire box will be inside
        Parameters:
        srcWidth - Width of the source image
        srcHeight - Height of the source image
        transform - Transform being applied to the image
        Returns:
        Bounding box
      • centerBoxInside

        public static georegression.struct.shapes.RectangleLength2D_F32 centerBoxInside​(int srcWidth,
                                                                                        int srcHeight,
                                                                                        boofcv.struct.distort.PixelTransform<georegression.struct.point.Point2D_F32> transform,
                                                                                        georegression.struct.point.Point2D_F32 work)
        Attempts to center the box inside. It will be approximately fitted too.
        Parameters:
        srcWidth - Width of the source image
        srcHeight - Height of the source image
        transform - Transform being applied to the image
        Returns:
        Bounding box
      • roundInside

        public static void roundInside​(georegression.struct.shapes.RectangleLength2D_F32 bound)
        Adjust bound to ensure the entire image is contained inside, otherwise there might be single pixel wide black regions