public class DistortImageOps
extends java.lang.Object
Provides common function for distorting images.
| Constructor and Description |
|---|
DistortImageOps() |
| Modifier and Type | Method and Description |
|---|---|
static <T extends ImageBase> |
affine(T input,
T output,
BorderType borderType,
InterpolateType interpType,
double a11,
double a12,
double a21,
double a22,
double dx,
double dy)
Deprecated.
As of v0.19. Use
FDistort instead |
static georegression.struct.shapes.RectangleLength2D_F32 |
boundBox_F32(int srcWidth,
int srcHeight,
PixelTransform2_F32 transform)
Finds an axis-aligned bounding box which would contain a image after it has been transformed.
|
static georegression.struct.shapes.RectangleLength2D_F64 |
boundBox_F64(int srcWidth,
int srcHeight,
PixelTransform2_F64 transform)
Finds an axis-aligned bounding box which would contain a image after it has been transformed.
|
static georegression.struct.shapes.RectangleLength2D_I32 |
boundBox(int srcWidth,
int srcHeight,
int dstWidth,
int dstHeight,
PixelTransform2_F32 transform)
Finds an axis-aligned bounding box which would contain a image after it has been transformed.
|
static georegression.struct.shapes.RectangleLength2D_I32 |
boundBox(int srcWidth,
int srcHeight,
PixelTransform2_F32 transform)
Finds an axis-aligned bounding box which would contain a image after it has been transformed.
|
static <Input extends ImageGray,Output extends ImageGray> |
createImageDistort(Point2Transform2_F32 transform,
InterpolateType interpType,
BorderType borderType,
java.lang.Class<Input> inputType,
java.lang.Class<Output> outputType)
Deprecated.
As of v0.19. Use
FDistort instead |
static <Input extends ImageGray,Output extends ImageGray,M extends Planar<Input>,N extends Planar<Output>> |
distortPL(M input,
N output,
PixelTransform2_F32 transform,
BorderType borderType,
InterpolateType interpType)
Deprecated.
As of v0.19. Use
FDistort instead |
static <Input extends ImageGray,Output extends ImageGray> |
distortPL(Planar<Input> input,
Planar<Output> output,
ImageDistort<Input,Output> distortion)
Deprecated.
As of v0.19. Use
FDistort instead |
static <Input extends ImageGray,Output extends ImageGray> |
distortSingle(Input input,
Output output,
boolean renderAll,
PixelTransform2_F32 transform,
InterpolatePixelS<Input> interp)
Deprecated.
As of v0.19. Use
FDistort instead |
static <Input extends ImageGray,Output extends ImageGray> |
distortSingle(Input input,
Output output,
PixelTransform2_F32 transform,
InterpolateType interpType,
BorderType borderType)
Deprecated.
As of v0.19. Use
FDistort instead |
static <T extends ImageBase> |
rotate(T input,
T output,
BorderType borderType,
InterpolateType interpType,
float angleInputToOutput)
Deprecated.
As of v0.19. Use
FDistort instead |
static <T extends ImageBase> |
scale(T input,
T output,
BorderType borderType,
InterpolateType interpType)
Deprecated.
|
@Deprecated public static <T extends ImageBase> void affine(T input, T output, BorderType borderType, InterpolateType interpType, double a11, double a12, double a21, double a22, double dx, double dy)
FDistort insteadApplies an affine transformation from the input image to the output image.
Input coordinates (x,y) to output coordinate (x',y')
x' = a11*x + a12*y + dx
y' = a21*x + a22*y + dy
input - Which which is being rotated.output - The image in which the output is written to.borderType - Describes how pixels outside the image border should be handled.interpType - Which type of interpolation will be used.public static <Input extends ImageGray,Output extends ImageGray> void distortSingle(Input input, Output output, PixelTransform2_F32 transform, InterpolateType interpType, BorderType borderType)
FDistort insteadinput - Input (source) image.output - Where the result of transforming the image image is written to.transform - The transform that is being applied to the imageinterpType - Which type of pixel interpolation should be used. BILINEAR is in general recommendedborderType - Specifies how to handle image borders.public static <Input extends ImageGray,Output extends ImageGray> void distortSingle(Input input, Output output, boolean renderAll, PixelTransform2_F32 transform, InterpolatePixelS<Input> interp)
FDistort insteadinput - Input (source) image.output - Where the result of transforming the image image is written to.renderAll - true it renders all pixels, even ones outside the input image.transform - The transform that is being applied to the imageinterp - Interpolation algorithm.public static <Input extends ImageGray,Output extends ImageGray,M extends Planar<Input>,N extends Planar<Output>> void distortPL(M input, N output, PixelTransform2_F32 transform, BorderType borderType, InterpolateType interpType)
FDistort insteadPlanar image.input - Input (source) image.output - Where the result of transforming the image image is written to.transform - The transform that is being applied to the imageborderType - Describes how pixels outside the image border should be handled.interpType - Which type of pixel interpolation should be used.public static <Input extends ImageGray,Output extends ImageGray> ImageDistort<Input,Output> createImageDistort(Point2Transform2_F32 transform, InterpolateType interpType, BorderType borderType, java.lang.Class<Input> inputType, java.lang.Class<Output> outputType)
FDistort insteadImageDistort given PixelTransform2_F32. To improve
performance the distortion is automatically cached.transform - Image transform.interpType - Which interpolation. Try bilinear.inputType - Image of single band image it will process.ImageDistortFactoryDistort,
FactoryInterpolation@Deprecated public static <T extends ImageBase> void scale(T input, T output, BorderType borderType, InterpolateType interpType)
input - Input image. Not modified.output - Rescaled input image. Modified.borderType - Describes how pixels outside the image border should be handled.interpType - Which interpolation algorithm should be used.@Deprecated public static <T extends ImageBase> void rotate(T input, T output, BorderType borderType, InterpolateType interpType, float angleInputToOutput)
FDistort insteadRotates the image using the specified interpolation type. The rotation is performed around the specified center of rotation in the input image.
Input coordinates (x,y) to output coordinate (x',y')
x' = x_c + c*(x-x_c) - s(y - y_c)
y' = y_c + s*(x-x_c) + c(y - y_c)
input - Which which is being rotated.output - The image in which the output is written to.borderType - Describes how pixels outside the image border should be handled.interpType - Which type of interpolation will be used.angleInputToOutput - Angle of rotation in radians. From input to output, CCW rotation.public static <Input extends ImageGray,Output extends ImageGray> void distortPL(Planar<Input> input, Planar<Output> output, ImageDistort<Input,Output> distortion)
FDistort insteadPlanar image.Input - Band type.input - Image being distorted. Not modified.output - Output image. modified.distortion - The distortion modelpublic static georegression.struct.shapes.RectangleLength2D_I32 boundBox(int srcWidth,
int srcHeight,
int dstWidth,
int dstHeight,
PixelTransform2_F32 transform)
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 imagepublic static georegression.struct.shapes.RectangleLength2D_I32 boundBox(int srcWidth,
int srcHeight,
PixelTransform2_F32 transform)
srcWidth - Width of the source imagesrcHeight - Height of the source imagetransform - Transform being applied to the imagepublic static georegression.struct.shapes.RectangleLength2D_F32 boundBox_F32(int srcWidth,
int srcHeight,
PixelTransform2_F32 transform)
srcWidth - Width of the source imagesrcHeight - Height of the source imagetransform - Transform being applied to the imagepublic static georegression.struct.shapes.RectangleLength2D_F64 boundBox_F64(int srcWidth,
int srcHeight,
PixelTransform2_F64 transform)
srcWidth - Width of the source imagesrcHeight - Height of the source imagetransform - Transform being applied to the image