Class DistortSupport

java.lang.Object
boofcv.alg.distort.impl.DistortSupport

public class DistortSupport extends Object
Provides low level functions that FDistort can call.
  • Constructor Details

    • DistortSupport

      public DistortSupport()
  • Method Details

    • transformScale

      public static PixelTransformAffine_F32 transformScale(ImageBase from, ImageBase to, @Nullable @Nullable PixelTransformAffine_F32 distort)
      Computes a transform which is used to rescale an image. The scale is computed directly from the size of the two input images and independently scales the x and y axises.
    • transformRotate

      public static PixelTransformAffine_F32 transformRotate(float x0, float y0, float x1, float y1, float angle)
      Creates a PixelTransformAffine_F32 from the dst image into the src image.
      Parameters:
      x0 - Center of rotation in input image coordinates.
      y0 - Center of rotation in input image coordinates.
      x1 - Center of rotation in output image coordinates.
      y1 - Center of rotation in output image coordinates.
      angle - Angle of rotation in radians.
    • rotateCenterAffine

      public static Affine2D_F32 rotateCenterAffine(float x0, float y0, float x1, float y1, float angle)
      Creates a PixelTransformAffine_F32 from the dst image into the src image.
      Parameters:
      x0 - Center of rotation in input image coordinates.
      y0 - Center of rotation in input image coordinates.
      x1 - Center of rotation in output image coordinates.
      y1 - Center of rotation in output image coordinates.
      angle - Angle of rotation in radians.
    • createDistortPL

      public static <Input extends ImageGray<Input>, Output extends ImageGray<Output>> ImageDistort<Planar<Input>,Planar<Output>> createDistortPL(Class<Output> outputType, PixelTransform<Point2D_F32> dstToSrc, InterpolatePixelS<Input> interp, boolean cached)
      Creates a ImageDistort for the planar images of the specified image type, transformation and interpolation instance.
      Parameters:
      dstToSrc - Transform from dst to src image.
      interp - Which interpolation algorithm should be used.