Package org.datavec.image.transform
Class BoxImageTransform
- java.lang.Object
-
- org.datavec.image.transform.BaseImageTransform<org.bytedeco.opencv.opencv_core.Mat>
-
- org.datavec.image.transform.BoxImageTransform
-
- All Implemented Interfaces:
Operation<ImageWritable,ImageWritable>,ImageTransform
public class BoxImageTransform 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 BoxImageTransform(int width, int height)Callsthis(null, width, height).BoxImageTransform(Random random, int width, int height)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)Takes an image and returns a boxed version of the image.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
-
BoxImageTransform
public BoxImageTransform(int width, int height)Callsthis(null, width, height).
-
BoxImageTransform
public BoxImageTransform(Random random, int width, int height)
Constructs an instance of the ImageTransform.- Parameters:
random- object to use (or null for deterministic)width- of the boxed image (pixels)height- of the boxed image (pixels)
-
-
Method Detail
-
doTransform
protected ImageWritable doTransform(ImageWritable image, Random random)
Takes an image and returns a boxed version of the image.- Specified by:
doTransformin classBaseImageTransform<org.bytedeco.opencv.opencv_core.Mat>- Parameters:
image- to transform, null == end of streamrandom- object to use (or null for deterministic)- Returns:
- transformed image
-
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
-
-