Cropping

class Cropping(top: Int, bottom: Int, left: Int, right: Int) : Operation<BufferedImage, BufferedImage>

This image preprocessor defines the Crop operation.

Crop operations creates new image with the following sizes:

Constructors

Cropping
Link copied to clipboard
fun Cropping(top: Int = 1, bottom: Int = 1, left: Int = 1, right: 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

bottom
Link copied to clipboard
var bottom: Int = 1

The image will be cropped from the bottom by the given number of pixels.

left
Link copied to clipboard
var left: Int = 1

The image will be cropped from the left by the given number of pixels.

right
Link copied to clipboard
var right: Int = 1

The image will be cropped from the right by the given number of pixels.

top
Link copied to clipboard
var top: Int = 1

The image will be cropped from the top by the given number of pixels.