Package ai.djl.modality.cv.transform
Class CenterCrop
- java.lang.Object
-
- ai.djl.modality.cv.transform.CenterCrop
-
-
Constructor Summary
Constructors Constructor Description CenterCrop()
CenterCrop(int width, int height)
Creates aCenterCrop
Transform
that crops the given width and height.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NDArray
transform(NDArray array)
Applies theTransform
to the givenNDArray
.
-
-
-
Constructor Detail
-
CenterCrop
public CenterCrop()
-
CenterCrop
public CenterCrop(int width, int height)
Creates aCenterCrop
Transform
that crops the given width and height.- Parameters:
width
- the desired width of the cropped imageheight
- the desired height of the cropped image
-
-