Companion

object Companion

Functions

getImage
Link copied to clipboard
fun getImage(inputStream: InputStream, imageType: String = "png"): BufferedImage

Returns BufferedImage extracted from inputStream with imageType.

imageTo3DFloatArray
Link copied to clipboard
fun imageTo3DFloatArray(image: BufferedImage, colorOrder: ColorOrder = ColorOrder.BGR): Array<Array<FloatArray>>

Converts image with colorOrder to the 3D array.

toBufferedImage
Link copied to clipboard
fun toBufferedImage(inputStream: InputStream, colorOrder: ColorOrder = ColorOrder.BGR): BufferedImage
toNormalizedFloatArray
Link copied to clipboard
fun toNormalizedFloatArray(imageFile: File, colorOrder: ColorOrder = ColorOrder.BGR): FloatArray
fun toNormalizedFloatArray(inputStream: InputStream, colorOrder: ColorOrder = ColorOrder.BGR): FloatArray

All pixels in range [0;1)

toRawFloatArray
Link copied to clipboard
fun toRawFloatArray(imageFile: File, colorOrder: ColorOrder = ColorOrder.BGR): FloatArray
fun toRawFloatArray(inputStream: InputStream, colorOrder: ColorOrder = ColorOrder.BGR): FloatArray

All pixels has values in range 0; 255.