Class Crop

  • All Implemented Interfaces:
    Transform

    public class Crop
    extends java.lang.Object
    implements Transform
    A Transform that crops the image to a given location and size.
    • Constructor Summary

      Constructors 
      Constructor Description
      Crop​(int x, int y, int width, int height)
      Creates a CenterCrop Transform.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      NDArray transform​(NDArray array)
      Applies the Transform to the given NDArray.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Crop

        public Crop​(int x,
                    int y,
                    int width,
                    int height)
        Creates a CenterCrop Transform.
        Parameters:
        x - the x coordinate of the top-left corner of the crop
        y - the y coordinate of the top-left corner of the crop
        width - the width of the cropped image
        height - the height of the cropped image