Convert

class Convert(colorMode: ColorMode) : ImagePreprocessorBase

Converts provided image to the desired ColorMode.

Constructors

Convert
Link copied to clipboard
fun Convert(colorMode: ColorMode = ColorMode.BGR)

Functions

apply
Link copied to clipboard
open override fun apply(image: BufferedImage): BufferedImage

Transforms provided input image.

getOutputShape
Link copied to clipboard
open override fun getOutputShape(inputShape: ImageShape): ImageShape

Computes output image shape for the provided inputShape. Note that some input dimensions could equal to null, which means that they are undefined. This is useful for the operations with fixed output size not dependent on the input size.

Properties

colorMode
Link copied to clipboard
var colorMode: ColorMode

target color mode.