public class RandomCropTransform extends BaseImageTransform<org.bytedeco.opencv.opencv_core.Mat>
| Modifier and Type | Field and Description |
|---|---|
protected int |
outputHeight |
protected int |
outputWidth |
protected Random |
rng |
converter, currentImage, random| Constructor and Description |
|---|
RandomCropTransform(int height,
int width) |
RandomCropTransform(long seed,
int height,
int width) |
RandomCropTransform(Random random,
long seed,
int height,
int width) |
| Modifier and Type | Method and Description |
|---|---|
protected ImageWritable |
doTransform(ImageWritable image,
Random random)
Takes an image and returns a randomly cropped image.
|
float[] |
query(float... coordinates)
Transforms the given coordinates using the parameters that were used to transform the last image.
|
getCurrentImage, transform, transformprotected int outputHeight
protected int outputWidth
protected Random rng
public RandomCropTransform(int height,
int width)
public RandomCropTransform(long seed,
int height,
int width)
public RandomCropTransform(Random random, long seed, int height, int width)
protected ImageWritable doTransform(ImageWritable image, Random random)
doTransform in class BaseImageTransform<org.bytedeco.opencv.opencv_core.Mat>image - to transform, null == end of streamrandom - object to use (or null for deterministic)public float[] query(float... coordinates)
ImageTransformquery in interface ImageTransformquery in class BaseImageTransform<org.bytedeco.opencv.opencv_core.Mat>coordinates - to transforms (x1, y1, x2, y2, ...)Copyright © 2019. All rights reserved.