public class LargestBlobCropTransform extends BaseImageTransform<org.bytedeco.javacpp.opencv_core.Mat>
org.bytedeco.javacpp.opencv_imgproc#blur(Mat, Mat, Size)
org.bytedeco.javacpp.opencv_imgproc#Canny(Mat ,Mat, double, double)
org.bytedeco.javacpp.opencv_imgproc#threshold(Mat, Mat, double, double, int)
org.bytedeco.javacpp.opencv_imgproc#findContours(Mat, MatVector, Mat, int, int)
org.bytedeco.javacpp.opencv_imgproc#contourArea(Mat, boolean)| 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 org.nd4j.linalg.api.rng.Random |
rng |
protected int |
upperThresh |
converter, 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 |
|---|---|
ImageWritable |
transform(ImageWritable image,
Random random)
Takes an image and returns a cropped image based on it's largest blob.
|
transformprotected org.nd4j.linalg.api.rng.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 Thresholdpublic ImageWritable transform(ImageWritable image, Random random)
image - to transform, null == end of streamrandom - object to use (or null for deterministic)Copyright © 2017. All rights reserved.