Package org.datavec.image.transform
Class ScaleImageTransform
- java.lang.Object
-
- org.datavec.image.transform.BaseImageTransform<org.bytedeco.opencv.opencv_core.Mat>
-
- org.datavec.image.transform.ScaleImageTransform
-
- All Implemented Interfaces:
Operation<ImageWritable,ImageWritable>,ImageTransform
public class ScaleImageTransform extends BaseImageTransform<org.bytedeco.opencv.opencv_core.Mat>
-
-
Field Summary
-
Fields inherited from class org.datavec.image.transform.BaseImageTransform
converter, currentImage, random
-
-
Constructor Summary
Constructors Constructor Description ScaleImageTransform(float delta)Callsthis(null, delta, delta).ScaleImageTransform(float dx, float dy)Callsthis(null, dx, dy).ScaleImageTransform(Random random, float delta)Callsthis(random, delta, delta).ScaleImageTransform(Random random, float dx, float dy)Constructs an instance of the ImageTransform.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ImageWritabledoTransform(ImageWritable image, Random random)float[]query(float... coordinates)Transforms the given coordinates using the parameters that were used to transform the last image.-
Methods inherited from class org.datavec.image.transform.BaseImageTransform
getCurrentImage, transform, transform
-
-
-
-
Constructor Detail
-
ScaleImageTransform
public ScaleImageTransform(float delta)
Callsthis(null, delta, delta).
-
ScaleImageTransform
public ScaleImageTransform(Random random, float delta)
Callsthis(random, delta, delta).
-
ScaleImageTransform
public ScaleImageTransform(float dx, float dy)Callsthis(null, dx, dy).
-
ScaleImageTransform
public ScaleImageTransform(Random random, float dx, float dy)
Constructs an instance of the ImageTransform.- Parameters:
random- object to use (or null for deterministic)dx- maximum scaling in width of the image (pixels)dy- maximum scaling in height of the image (pixels)
-
-
Method Detail
-
doTransform
protected ImageWritable doTransform(ImageWritable image, Random random)
- Specified by:
doTransformin classBaseImageTransform<org.bytedeco.opencv.opencv_core.Mat>
-
query
public float[] query(float... coordinates)
Description copied from interface:ImageTransformTransforms the given coordinates using the parameters that were used to transform the last image.- Specified by:
queryin interfaceImageTransform- Overrides:
queryin classBaseImageTransform<org.bytedeco.opencv.opencv_core.Mat>- Parameters:
coordinates- to transforms (x1, y1, x2, y2, ...)- Returns:
- transformed coordinates
-
-