Class LensDistortionOps_F32

java.lang.Object
boofcv.alg.distort.LensDistortionOps_F32

@Generated("boofcv.alg.distort.LensDistortionOps_F64") public class LensDistortionOps_F32 extends Object
Operations related to manipulating lens distortion in images
  • Constructor Details

    • LensDistortionOps_F32

      public LensDistortionOps_F32()
  • Method Details

    • transformChangeModel

      public static <O extends CameraPinhole, D extends CameraPinhole> Point2Transform2_F32 transformChangeModel(AdjustmentType type, O paramOriginal, D paramDesired, boolean desiredToOriginal, @Nullable 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 RectangleLength2D_F32 boundBoxInside(int srcWidth, int srcHeight, PixelTransform<Point2D_F32> transform, 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 RectangleLength2D_F32 centerBoxInside(int srcWidth, int srcHeight, PixelTransform<Point2D_F32> transform, 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(RectangleLength2D_F32 bound)
      Adjust bound to ensure the entire image is contained inside, otherwise there might be single pixel wide black regions