Package boofcv.alg.distort.impl
Class DistortSupport
java.lang.Object
boofcv.alg.distort.impl.DistortSupport
Provides low level functions that
FDistort can call.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <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 aImageDistortfor the planar images of the specified image type, transformation and interpolation instance.static Affine2D_F32rotateCenterAffine(float x0, float y0, float x1, float y1, float angle) Creates aPixelTransformAffine_F32from the dst image into the src image.static PixelTransformAffine_F32transformRotate(float x0, float y0, float x1, float y1, float angle) Creates aPixelTransformAffine_F32from the dst image into the src image.static PixelTransformAffine_F32transformScale(ImageBase from, ImageBase to, @Nullable PixelTransformAffine_F32 distort) Computes a transform which is used to rescale an image.
-
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 aPixelTransformAffine_F32from 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
Creates aPixelTransformAffine_F32from 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 aImageDistortfor 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.
-