Class BoxImageTransform

    • Constructor Detail

      • BoxImageTransform

        public BoxImageTransform​(int width,
                                 int height)
        Calls this(null, width, height).
      • BoxImageTransform

        public BoxImageTransform​(Random random,
                                 int width,
                                 int height)
        Constructs an instance of the ImageTransform.
        Parameters:
        random - object to use (or null for deterministic)
        width - of the boxed image (pixels)
        height - of the boxed image (pixels)
    • Method Detail

      • doTransform

        protected ImageWritable doTransform​(ImageWritable image,
                                            Random random)
        Takes an image and returns a boxed version of the image.
        Specified by:
        doTransform in class BaseImageTransform<org.bytedeco.opencv.opencv_core.Mat>
        Parameters:
        image - to transform, null == end of stream
        random - object to use (or null for deterministic)
        Returns:
        transformed image
      • query

        public float[] query​(float... coordinates)
        Description copied from interface: ImageTransform
        Transforms the given coordinates using the parameters that were used to transform the last image.
        Specified by:
        query in interface ImageTransform
        Overrides:
        query in class BaseImageTransform<org.bytedeco.opencv.opencv_core.Mat>
        Parameters:
        coordinates - to transforms (x1, y1, x2, y2, ...)
        Returns:
        transformed coordinates