Back to Tensorflow

ImageProcessor.Builder

tensorflow/lite/g3doc/api_docs/java/org/tensorflow/lite/support/image/ImageProcessor.Builder.html

2.21.03.6 KB
Original Source

public static class ImageProcessor.Builder

The Builder to create an ImageProcessor, which could be executed later.

See Also
  • to add a general TensorOperator
  • to add an ImageOperator
  • complete the building process and get a built Processor

Public Constructors

| | Builder() |

Public Methods

| Builder<TensorImage> | add(Operator<T> op) | | ImageProcessor.Builder | add(TensorOperator op) Adds a TensorOperator into the Operator chain.

| | ImageProcessor.Builder | add(ImageOperator op) Adds an ImageOperator into the Operator chain.

| | ImageProcessor | build() Completes the building process and gets the ImageProcessor instance.

|

Inherited Methods

From class java.lang.Object

| boolean | equals(Object arg0) | | final Class<?> | getClass() | | int | hashCode() | | final void | notify() | | final void | notifyAll() | | String | toString() | | final void | wait(long arg0, int arg1) | | final void | wait(long arg0) | | final void | wait() |

Public Constructors

public Builder ()

Public Methods

public Builder<TensorImage> add (Operator<T> op)

Parameters

| op | |

public ImageProcessor.Builder add (TensorOperator op)

Adds a TensorOperator into the Operator chain. In execution, the processor calls TensorImage.getTensorBuffer() to transform the TensorImage by transforming the underlying TensorBuffer.

Parameters

| op | the Operator instance to be executed then |

public ImageProcessor.Builder add (ImageOperator op)

Adds an ImageOperator into the Operator chain.

Parameters

| op | the Operator instance to be executed then |

public ImageProcessor build ()

Completes the building process and gets the ImageProcessor instance.