Class CenterCrop

java.lang.Object
ai.djl.modality.cv.transform.CenterCrop
All Implemented Interfaces:
Transform

public class CenterCrop extends Object implements Transform
A Transform that crops the center of an image.
  • Constructor Details

    • CenterCrop

      public CenterCrop()
      Creates a CenterCrop Transform that crops to size min(width, height).
    • CenterCrop

      public CenterCrop(int width, int height)
      Creates a CenterCrop Transform that crops the given width and height.
      Parameters:
      width - the desired width of the cropped image
      height - the desired height of the cropped image
  • Method Details