Rescaling

class Rescaling(scalingCoefficient: Float) : Preprocessor

This preprocessor defines the Rescaling operation. It scales each pixel pixel_i = pixel_i / scalingCoefficient.

NOTE: currently it supports BufferedImage.TYPE_3BYTE_BGR image type only.

Constructors

Rescaling
Link copied to clipboard
fun Rescaling(scalingCoefficient: Float = 255f)

Functions

apply
Link copied to clipboard
open override fun apply(data: FloatArray, inputShape: ImageShape): FloatArray

Transforms data with inputShape to the new data with the same shape.

Properties

scalingCoefficient
Link copied to clipboard
var scalingCoefficient: Float = 255f

Scaling coefficient.