CenterCrop

class CenterCrop(size: Int) : Operation<BufferedImage, BufferedImage>

This image preprocessor defines centerCrop operation. It crops the given image at the center. If the image size is smaller than the output size along any edge, the image is padded with 0 and then center cropped.

Constructors

CenterCrop
Link copied to clipboard
fun CenterCrop(size: Int = -1)

Functions

apply
Link copied to clipboard
open override fun apply(input: BufferedImage): BufferedImage
getOutputShape
Link copied to clipboard
open override fun getOutputShape(inputShape: TensorShape): TensorShape

Properties

size
Link copied to clipboard
var size: Int

target image size.