Class DistortImageOps

java.lang.Object
boofcv.alg.distort.DistortImageOps

public class DistortImageOps extends Object

Provides common function for distorting images.

  • Constructor Details

    • DistortImageOps

      public DistortImageOps()
  • Method Details

    • boundBox

      public static RectangleLength2D_I32 boundBox(int srcWidth, int srcHeight, int dstWidth, int dstHeight, Point2D_F32 work, PixelTransform<Point2D_F32> transform)
      Finds an axis-aligned bounding box which would contain a image after it has been transformed. A sanity check is done to made sure it is contained inside the destination image's bounds. If it is totally outside then a rectangle with negative width or height is returned.
      Parameters:
      srcWidth - Width of the source image
      srcHeight - Height of the source image
      dstWidth - Width of the destination image
      dstHeight - Height of the destination image
      transform - Transform being applied to the image
      Returns:
      Bounding box
    • boundBox

      public static RectangleLength2D_I32 boundBox(int srcWidth, int srcHeight, Point2D_F32 work, PixelTransform<Point2D_F32> transform)
      Finds an axis-aligned bounding box which would contain a image after it has been transformed. The returned bounding box can be larger then the original image.
      Parameters:
      srcWidth - Width of the source image
      srcHeight - Height of the source image
      transform - Transform being applied to the image
      Returns:
      Bounding box
    • boundBox_F32

      public static RectangleLength2D_F32 boundBox_F32(int srcWidth, int srcHeight, PixelTransform<Point2D_F32> transform, Point2D_F32 transformed)
      Finds an axis-aligned bounding box which would contain a image after it has been transformed. The returned bounding box can be larger then the original image.
      Parameters:
      srcWidth - Width of the source image
      srcHeight - Height of the source image
      transform - Transform being applied to the image
      Returns:
      Bounding box
    • boundBox_F64

      public static RectangleLength2D_F64 boundBox_F64(int srcWidth, int srcHeight, PixelTransform<Point2D_F64> transform, Point2D_F64 transformed)
      Finds an axis-aligned bounding box which would contain a image after it has been transformed. The returned bounding box can be larger then the original image.
      Parameters:
      srcWidth - Width of the source image
      srcHeight - Height of the source image
      transform - Transform being applied to the image
      Returns:
      Bounding box