Rotate

class Rotate(degrees: Float, interpolation: InterpolationType, renderingSpeed: RenderingSpeed, enableAntialiasing: Boolean) : Operation<BufferedImage, BufferedImage>

This image preprocessor defines the Rotate operation.

It rotates the input image on degrees.

The final image quality depends on the following tunable parameters: interpolation, renderingSpeed, enableAntialiasing.

Constructors

Rotate
Link copied to clipboard
fun Rotate(degrees: Float = 90f, interpolation: InterpolationType = InterpolationType.BICUBIC, renderingSpeed: RenderingSpeed = RenderingSpeed.MEDIUM, enableAntialiasing: Boolean = true)

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

degrees
Link copied to clipboard
var degrees: Float = 90f

The rotation angle.

enableAntialiasing
Link copied to clipboard
var enableAntialiasing: Boolean = true

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

interpolation
Link copied to clipboard
var interpolation: InterpolationType

Interpolation algorithm.

renderingSpeed
Link copied to clipboard
var renderingSpeed: RenderingSpeed

Speed of preprocessing.