ResizeOp class

As a computation unit for processing images, it can resize an image to user-specified size.

It interpolates pixels when image is stretched, and discards pixels when image is compressed.

See ResizeWithCropOrPadOp for resizing without content distortion.

Implemented types

Constructors

ResizeOp(int _targetHeight, int _targetWidth, ResizeMethod resizeMethod)
Creates a ResizeOp which can resize images to height: _targetHeight & width: _targetWidth using algorithm resizeMethod.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

apply(TensorImage image) TensorImage
Applies the defined resizing on image and returns the result.
override
getOutputImageHeight(int inputImageHeight, int inputImageWidth) int
Computes the height of the expected output image when input image size is given.
override
getOutputImageWidth(int inputImageHeight, int inputImageWidth) int
Computes the width of the expected output image when input image size is given.
override
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.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited