Package ai.konduit.serving.data.image.convert.config
-
Class Summary Class Description ImageNormalization NONE: No image normalization will be applied SCALE: Divide images by maxValue/2, or divide by 255/2 if maxValue is not specified, then subtract 1.0, to give output in range [-1,1]. -
Enum Summary Enum Description AspectRatioHandling How We should handle the situation where the input image and output image/NDArray have different aspect ratios?
Use inImageToNDArrayConfigandImageResizeStepSeeImageToNDArrayConfigfor more details
CENTER_CROP: Crop the larger dimension down to the correct aspect ratio (and then resize if necessary). PAD: Zero pad the smaller dimension to make the aspect ratio match the output (and then resize if necessary) STRETCH: Simply resize the image to the required aspect ratio, distorting the image if necessaryImageNormalization.Type NDChannelLayout Represents the type (and order) of the channels for an image after it has been converted to an NDArray RGB: 3 channels, ordered according to: red, green, blue - most common for TensorFlow, Keras, and some other libraries BGR: 3 channels, ordered according to: blue, green, red - the default for OpenCV, JavaCV, DL4J RGBA: 4 channels, ordered according to: red, green, blue, alpha BGRA: 4 channels, ordered according to: blue, green, red, alpha GRAYSCALE: 1 channel - grayscaleNDFormat