boofcv.alg.distort
Class RemovePerspectiveDistortion<T extends ImageBase>
- java.lang.Object
-
- boofcv.alg.distort.RemovePerspectiveDistortion<T>
-
public class RemovePerspectiveDistortion<T extends ImageBase> extends java.lang.ObjectClass which simplifies the removal of perspective distortion from a region inside an image. Given the ordered corners of a quadrilateral in the input image it applies a homography transform which reprojects the region into the input image into a rectangular output image.
-
-
Constructor Summary
Constructors Constructor and Description RemovePerspectiveDistortion(int width, int height, ImageType<T> imageType)Constructor which specifies the characteristics of the undistorted image
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleanapply(T input, Point2D_F64 corner0, Point2D_F64 corner1, Point2D_F64 corner2, Point2D_F64 corner3)Applies distortion removal to the specified region in the input image.TgetOutput()Returns the undistorted output image
-
-
-
Constructor Detail
-
RemovePerspectiveDistortion
public RemovePerspectiveDistortion(int width, int height, ImageType<T> imageType)Constructor which specifies the characteristics of the undistorted image- Parameters:
width- Width of undistorted imageheight- Height of undistorted imageimageType- Type of undistorted image
-
-
Method Detail
-
apply
public boolean apply(T input, Point2D_F64 corner0, Point2D_F64 corner1, Point2D_F64 corner2, Point2D_F64 corner3)
Applies distortion removal to the specified region in the input image. The undistorted image is returned.- Parameters:
input- Input imagecorner0- Top left cornercorner1- Top right cornercorner2- Bottom right cornercorner3- Bottom left corner- Returns:
- true if successful or false if it failed
-
getOutput
public T getOutput()
Returns the undistorted output image
-
-
DataMelt 3.0 © DataMelt by jWork.ORG