public class CropImageTransform extends BaseImageTransform<org.bytedeco.javacpp.opencv_core.Mat>
converter, currentImage, random| Constructor and Description |
|---|
CropImageTransform(int crop)
Calls
this(null, crop, crop, crop, crop). |
CropImageTransform(int cropTop,
int cropLeft,
int cropBottom,
int cropRight)
Calls
this(random, cropTop, cropLeft, cropBottom, cropRight). |
CropImageTransform(Random random,
int crop)
Calls
this(random, crop, crop, crop, crop). |
CropImageTransform(Random random,
int cropTop,
int cropLeft,
int cropBottom,
int cropRight)
Constructs an instance of the ImageTransform.
|
| Modifier and Type | Method and Description |
|---|---|
protected ImageWritable |
doTransform(ImageWritable image,
Random random)
Takes an image and returns a transformed image.
|
float[] |
query(float... coordinates)
Transforms the given coordinates using the parameters that were used to transform the last image.
|
getCurrentImage, transform, transformpublic CropImageTransform(int crop)
this(null, crop, crop, crop, crop).public CropImageTransform(Random random, int crop)
this(random, crop, crop, crop, crop).public CropImageTransform(int cropTop,
int cropLeft,
int cropBottom,
int cropRight)
this(random, cropTop, cropLeft, cropBottom, cropRight).public CropImageTransform(Random random, int cropTop, int cropLeft, int cropBottom, int cropRight)
random - object to use (or null for deterministic)cropTop - maximum cropping of the top of the image (pixels)cropLeft - maximum cropping of the left of the image (pixels)cropBottom - maximum cropping of the bottom of the image (pixels)cropRight - maximum cropping of the right of the image (pixels)protected ImageWritable doTransform(ImageWritable image, Random random)
doTransform in class BaseImageTransform<org.bytedeco.javacpp.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.javacpp.opencv_core.Mat>coordinates - to transforms (x1, y1, x2, y2, ...)Copyright © 2018. All rights reserved.