Package boofcv.alg.distort
Class DistortImageOps
java.lang.Object
boofcv.alg.distort.DistortImageOps
Provides common function for distorting images.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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.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.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.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.
-
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 imagesrcHeight
- Height of the source imagedstWidth
- Width of the destination imagedstHeight
- Height of the destination imagetransform
- 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 imagesrcHeight
- Height of the source imagetransform
- 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 imagesrcHeight
- Height of the source imagetransform
- 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 imagesrcHeight
- Height of the source imagetransform
- Transform being applied to the image- Returns:
- Bounding box
-