ImageProcessor class
ImageProcessor is a helper class for preprocessing and postprocessing TensorImage.
It could transform a TensorImage to another by executing a chain of ImageOperator.
Example Usage:
ImageProcessor processor = ImageProcessorBuilder()
.add(ResizeOp(224, 224, ResizeMethod.NEAREST_NEIGHBOR)
.add(Rot90Op())
.add(NormalizeOp(127.5, 127.5))
.build();
TensorImage anotherTensorImage = processor.process(tensorImage);
See ImageProcessorBuilder to build a ImageProcessor instance
See SequentialProcessor.process to apply the processor on a TensorImage
- Inheritance
-
- Object
- SequentialProcessor<
TensorImage> - ImageProcessor
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
operatorIndex
↔ Map<
String, List< int> > -
The Map between the operator name and the corresponding op indexes in operatorList.
An operator may be added multiple times into this SequentialProcessor.
getter/setter pairinherited
-
operatorList
↔ List<
Operator< TensorImage> > -
List of operators added to this SequentialProcessor.
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
inverseTransform(
Point< num> point, int inputImageHeight, int inputImageWidth) → Point<num> -
Transforms a
point
from coordinates system of the result image back to the one of the input image. -
inverseTransformRect(
Rect rect, int inputImageHeight, int inputImageWidth) → Rect -
Transforms a
rect
from coordinates system of the result image back to the one of the input image. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
process(
TensorImage input) → TensorImage -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
updateNumberOfRotations(
int k, int occurrence) → void
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited