Padding

class Padding(top: Int, bottom: Int, left: Int, right: Int, mode: PaddingMode) : Operation<BufferedImage, BufferedImage>

This image preprocessor defines the Pad operation.

Pad operation pads the given image on all sides according to the provided PaddingMode.

Constructors

Padding
Link copied to clipboard
fun Padding(top: Int = 0, bottom: Int = 0, left: Int = 0, right: Int = 0, mode: PaddingMode = PaddingMode.Black)

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 = 0

The number of pixels to add to the bottom.

left
Link copied to clipboard
var left: Int = 0

The number of pixels to add to the left.

mode
Link copied to clipboard
var mode: PaddingMode

The kind of padding to use.

right
Link copied to clipboard
var right: Int = 0

The number of pixels to add to the right.

top
Link copied to clipboard
var top: Int = 0

The number of pixels to add to the top.