T
- the output object typepublic abstract class ImageTranslator<T> extends java.lang.Object implements Translator<java.awt.image.BufferedImage,T>
Translator
that provides default image pre-processing.Modifier and Type | Class and Description |
---|---|
static class |
ImageTranslator.BaseBuilder<T extends ImageTranslator.BaseBuilder>
A builder to extend for all classes extending the
ImageTranslator . |
Constructor and Description |
---|
ImageTranslator(ImageTranslator.BaseBuilder<?> builder)
Constructs an ImageTranslator with the provided builder.
|
Modifier and Type | Method and Description |
---|---|
Pipeline |
getPipeline()
Gets the
Pipeline applied to the input. |
NDList |
processInput(TranslatorContext ctx,
java.awt.image.BufferedImage input)
Processes the
BufferedImage input and converts it to NDList. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getBatchifier, prepare
processOutput
public ImageTranslator(ImageTranslator.BaseBuilder<?> builder)
builder
- the data to build withpublic Pipeline getPipeline()
Pipeline
applied to the input.getPipeline
in interface PreProcessor<java.awt.image.BufferedImage>
Pipeline
public NDList processInput(TranslatorContext ctx, java.awt.image.BufferedImage input)
BufferedImage
input and converts it to NDList.processInput
in interface PreProcessor<java.awt.image.BufferedImage>
ctx
- the toolkit that helps create the input NDArrayinput
- the BufferedImage
inputNDList