Documentation of 'boofcv.alg.distort.DistortImageOps' Java class
DistortImageOps
boofcv.alg.distort

Class DistortImageOps



  • public class DistortImageOps
    extends java.lang.Object

    Provides common function for distorting images.

    • Constructor Detail

      • DistortImageOps

        public DistortImageOps()
    • Method Detail

      • affine

        @Deprecated
        public static <T extends ImageBase> void affine(T input,
                                                                    T output,
                                                                    BorderType borderType,
                                                                    TypeInterpolate interpType,
                                                                    double a11,
                                                                    double a12,
                                                                    double a21,
                                                                    double a22,
                                                                    double dx,
                                                                    double dy)
        Deprecated. As of v0.19. Use FDistort instead

        Applies 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

        Parameters:
        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.
      • distortSingle

        public static <Input extends ImageGray,Output extends ImageGray> void distortSingle(Input input,
                                                                                            Output output,
                                                                                            PixelTransform_F32 transform,
                                                                                            TypeInterpolate interpType,
                                                                                            BorderType borderType)
        Deprecated. As of v0.19. Use FDistort instead
        Applies a pixel transform to a single band image. Easier to use function.
        Parameters:
        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 image
        interpType - Which type of pixel interpolation should be used. BILINEAR is in general recommended
        borderType - Specifies how to handle image borders.
      • distortSingle

        public static <Input extends ImageGray,Output extends ImageGray> void distortSingle(Input input,
                                                                                            Output output,
                                                                                            boolean renderAll,
                                                                                            PixelTransform_F32 transform,
                                                                                            InterpolatePixelS<Input> interp)
        Deprecated. As of v0.19. Use FDistort instead
        Applies a pixel transform to a single band image. More flexible but order to use function.
        Parameters:
        input - 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 image
        interp - Interpolation algorithm.
      • distortPL

        public static <Input extends ImageGray,Output extends ImageGray,M extends Planar<Input>,N extends Planar<Output>> void distortPL(M input,
                                                                                                                                         N output,
                                                                                                                                         PixelTransform_F32 transform,
                                                                                                                                         BorderType borderType,
                                                                                                                                         TypeInterpolate interpType)
        Deprecated. As of v0.19. Use FDistort instead
        Applies a pixel transform to a Planar image.
        Parameters:
        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 image
        borderType - Describes how pixels outside the image border should be handled.
        interpType - Which type of pixel interpolation should be used.
      • scale

        @Deprecated
        public static <T extends ImageBase> void scale(T input,
                                                                   T output,
                                                                   BorderType borderType,
                                                                   TypeInterpolate interpType)
        Deprecated. 
        Rescales the input image and writes the results into the output image. The scale factor is determined independently of the width and height.
        Parameters:
        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.
      • rotate

        @Deprecated
        public static <T extends ImageBase> void rotate(T input,
                                                                    T output,
                                                                    BorderType borderType,
                                                                    TypeInterpolate interpType,
                                                                    float angleInputToOutput)
        Deprecated. As of v0.19. Use FDistort instead

        Rotates 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)

        Parameters:
        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.
      • distortPL

        public static <Input extends ImageGray,Output extends ImageGray> void distortPL(Planar<Input> input,
                                                                                        Planar<Output> output,
                                                                                        ImageDistort<Input,Output> distortion)
        Deprecated. As of v0.19. Use FDistort instead
        Applies a distortion to a Planar image.
        Type Parameters:
        Input - Band type.
        Parameters:
        input - Image being distorted. Not modified.
        output - Output image. modified.
        distortion - The distortion model
      • boundBox

        public static RectangleLength2D_I32 boundBox(int srcWidth,
                                                     int srcHeight,
                                                     int dstWidth,
                                                     int dstHeight,
                                                     PixelTransform_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 image
        srcHeight - Height of the source image
        dstWidth - Width of the destination image
        dstHeight - Height of the destination image
        transform - Transform being applied to the image
        Returns:
        Bounding box
      • boundBox

        public static RectangleLength2D_I32 boundBox(int srcWidth,
                                                     int srcHeight,
                                                     PixelTransform_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 image
        srcHeight - Height of the source image
        transform - Transform being applied to the image
        Returns:
        Bounding box
      • boundBox_F32

        public static RectangleLength2D_F32 boundBox_F32(int srcWidth,
                                                         int srcHeight,
                                                         PixelTransform_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 image
        srcHeight - Height of the source image
        transform - Transform being applied to the image
        Returns:
        Bounding box
      • boundBox_F64

        public static RectangleLength2D_F64 boundBox_F64(int srcWidth,
                                                         int srcHeight,
                                                         PixelTransform_F64 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 image
        srcHeight - Height of the source image
        transform - Transform being applied to the image
        Returns:
        Bounding box

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.