Crop

class Crop(x: Int, y: Int, width: Int, height: Int) : Operation<Bitmap, Bitmap>

This class defines the Crop Operation.

Crop operation crops the given image at the specified location and size. If the cropped region does not fit into the input image, the image is padded first and then cropped.

Constructors

Crop
Link copied to clipboard
fun Crop(x: Int = 0, y: Int = 0, width: Int = 0, height: Int = 0)

Functions

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

Properties

height
Link copied to clipboard
var height: Int = 0

cropped region height

width
Link copied to clipboard
var width: Int = 0

cropped region width

x
Link copied to clipboard
var x: Int = 0

cropped region top-left corner x-coordinate

y
Link copied to clipboard
var y: Int = 0

cropped region top-left corner y-coordinate