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 boofcv.struct.image.ImageBase<T>> |
affine(T input,
T output,
boofcv.struct.border.BorderType borderType,
InterpolationType 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,
boofcv.struct.distort.PixelTransform<georegression.struct.point.Point2D_F32> transform,
georegression.struct.point.Point2D_F32 transformed)
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,
boofcv.struct.distort.PixelTransform<georegression.struct.point.Point2D_F64> transform,
georegression.struct.point.Point2D_F64 transformed)
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,
georegression.struct.point.Point2D_F32 work,
boofcv.struct.distort.PixelTransform<georegression.struct.point.Point2D_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,
georegression.struct.point.Point2D_F32 work,
boofcv.struct.distort.PixelTransform<georegression.struct.point.Point2D_F32> transform)
Finds an axis-aligned bounding box which would contain a image after it has been transformed.
|
static <Input extends boofcv.struct.image.ImageGray<Input>,Output extends boofcv.struct.image.ImageGray<Output>> |
createImageDistort(boofcv.struct.distort.Point2Transform2_F32 transform,
InterpolationType interpType,
boofcv.struct.border.BorderType borderType,
java.lang.Class<Input> inputType,
java.lang.Class<Output> outputType)
Deprecated.
As of v0.19. Use
FDistort instead |
static <Input extends boofcv.struct.image.ImageGray<Input>,Output extends boofcv.struct.image.ImageGray<Output>,M extends boofcv.struct.image.Planar<Input>,N extends boofcv.struct.image.Planar<Output>> |
distortPL(M input,
N output,
boofcv.struct.distort.PixelTransform<georegression.struct.point.Point2D_F32> transform,
boofcv.struct.border.BorderType borderType,
InterpolationType interpType)
Deprecated.
As of v0.19. Use
FDistort instead |
static <Input extends boofcv.struct.image.ImageGray<Input>,Output extends boofcv.struct.image.ImageGray<Output>> |
distortPL(boofcv.struct.image.Planar<Input> input,
boofcv.struct.image.Planar<Output> output,
ImageDistort<Input,Output> distortion)
Deprecated.
As of v0.19. Use
FDistort instead |
static <Input extends boofcv.struct.image.ImageGray<Input>,Output extends boofcv.struct.image.ImageGray<Output>> |
distortSingle(Input input,
Output output,
boolean renderAll,
boofcv.struct.distort.PixelTransform<georegression.struct.point.Point2D_F32> transform,
InterpolatePixelS<Input> interp)
Deprecated.
As of v0.19. Use
FDistort instead |
static <Input extends boofcv.struct.image.ImageGray<Input>,Output extends boofcv.struct.image.ImageGray<Output>> |
distortSingle(Input input,
Output output,
boofcv.struct.distort.PixelTransform<georegression.struct.point.Point2D_F32> transform,
InterpolationType interpType,
boofcv.struct.border.BorderType borderType)
Deprecated.
As of v0.19. Use
FDistort instead |
static <T extends boofcv.struct.image.ImageBase<T>> |
rotate(T input,
T output,
boofcv.struct.border.BorderType borderType,
InterpolationType interpType,
float angleInputToOutput)
Deprecated.
As of v0.19. Use
FDistort instead |
static <T extends boofcv.struct.image.ImageBase<T>> |
scale(T input,
T output,
boofcv.struct.border.BorderType borderType,
InterpolationType interpType)
Deprecated.
|
@Deprecated
public static <T extends boofcv.struct.image.ImageBase<T>> void affine(T input,
T output,
boofcv.struct.border.BorderType borderType,
InterpolationType 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 boofcv.struct.image.ImageGray<Input>,Output extends boofcv.struct.image.ImageGray<Output>> void distortSingle(Input input,
Output output,
boofcv.struct.distort.PixelTransform<georegression.struct.point.Point2D_F32> transform,
InterpolationType interpType,
boofcv.struct.border.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 boofcv.struct.image.ImageGray<Input>,Output extends boofcv.struct.image.ImageGray<Output>> void distortSingle(Input input,
Output output,
boolean renderAll,
boofcv.struct.distort.PixelTransform<georegression.struct.point.Point2D_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 boofcv.struct.image.ImageGray<Input>,Output extends boofcv.struct.image.ImageGray<Output>,M extends boofcv.struct.image.Planar<Input>,N extends boofcv.struct.image.Planar<Output>> void distortPL(M input,
N output,
boofcv.struct.distort.PixelTransform<georegression.struct.point.Point2D_F32> transform,
boofcv.struct.border.BorderType borderType,
InterpolationType 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 boofcv.struct.image.ImageGray<Input>,Output extends boofcv.struct.image.ImageGray<Output>> ImageDistort<Input,Output> createImageDistort(boofcv.struct.distort.Point2Transform2_F32 transform, InterpolationType interpType, boofcv.struct.border.BorderType borderType, java.lang.Class<Input> inputType, java.lang.Class<Output> outputType)
FDistort insteadImageDistort given PixelTransform. 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 boofcv.struct.image.ImageBase<T>> void scale(T input,
T output,
boofcv.struct.border.BorderType borderType,
InterpolationType 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 boofcv.struct.image.ImageBase<T>> void rotate(T input,
T output,
boofcv.struct.border.BorderType borderType,
InterpolationType 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 boofcv.struct.image.ImageGray<Input>,Output extends boofcv.struct.image.ImageGray<Output>> void distortPL(boofcv.struct.image.Planar<Input> input,
boofcv.struct.image.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,
georegression.struct.point.Point2D_F32 work,
boofcv.struct.distort.PixelTransform<georegression.struct.point.Point2D_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,
georegression.struct.point.Point2D_F32 work,
boofcv.struct.distort.PixelTransform<georegression.struct.point.Point2D_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,
boofcv.struct.distort.PixelTransform<georegression.struct.point.Point2D_F32> transform,
georegression.struct.point.Point2D_F32 transformed)
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,
boofcv.struct.distort.PixelTransform<georegression.struct.point.Point2D_F64> transform,
georegression.struct.point.Point2D_F64 transformed)
srcWidth - Width of the source imagesrcHeight - Height of the source imagetransform - Transform being applied to the image