public class LargestBlobCropTransform extends BaseImageTransform<org.bytedeco.opencv.opencv_core.Mat>
| Modifier and Type | Field and Description |
|---|---|
protected int |
blurHeight |
protected int |
blurWidth |
protected boolean |
isCanny |
protected int |
lowerThresh |
protected int |
method |
protected int |
mode |
protected Random |
rng |
protected int |
upperThresh |
converter, currentImage, random| Constructor and Description |
|---|
LargestBlobCropTransform()
Calls
this(null |
LargestBlobCropTransform(Random random)
Calls
this(random, CV_RETR_CCOMP, CV_CHAIN_APPROX_SIMPLE, 3, 3, 100, 200, true) |
LargestBlobCropTransform(Random random,
int mode,
int method,
int blurWidth,
int blurHeight,
int lowerThresh,
int upperThresh,
boolean isCanny) |
| Modifier and Type | Method and Description |
|---|---|
protected ImageWritable |
doTransform(ImageWritable image,
Random random)
Takes an image and returns a cropped image based on it's largest blob.
|
float[] |
query(float... coordinates)
Transforms the given coordinates using the parameters that were used to transform the last image.
|
getCurrentImage, transform, transformprotected Random rng
protected int mode
protected int method
protected int blurWidth
protected int blurHeight
protected int upperThresh
protected int lowerThresh
protected boolean isCanny
public LargestBlobCropTransform()
this(nullpublic LargestBlobCropTransform(Random random)
this(random, CV_RETR_CCOMP, CV_CHAIN_APPROX_SIMPLE, 3, 3, 100, 200, true)public LargestBlobCropTransform(Random random, int mode, int method, int blurWidth, int blurHeight, int lowerThresh, int upperThresh, boolean isCanny)
random - Object to use (or null for deterministic)mode - Contour retrieval modemethod - Contour approximation methodblurWidth - Width of blurring kernel sizeblurHeight - Height of blurring kernel sizelowerThresh - Lower threshold for either Canny or ThresholdupperThresh - Upper threshold for either Canny or ThresholdisCanny - Whether the edge detector is Canny or Thresholdprotected 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 © 2022. All rights reserved.