本文整理了Java中org.opencv.imgproc.Imgproc.erode()
方法的一些代码示例,展示了Imgproc.erode()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Imgproc.erode()
方法的具体详情如下:
包路径:org.opencv.imgproc.Imgproc
类名称:Imgproc
方法名:erode
[英]Erodes an image by using a specific structuring element.
The function erodes the source image using the specified structuring element that determines the shape of a pixel neighborhood over which the minimum is taken:
dst(x,y) = min _((x',y'): element(x',y') != 0) src(x+x',y+y')
The function supports the in-place mode. Erosion can be applied several (iterations
) times. In case of multi-channel images, each channel is processed independently.
Note:
iterations
)。在多通道图像的情况下,每个通道独立处理。代码示例来源:origin: ytai/IOIOPlotter
private void HitAndMiss(Mat src, Mat dst, Mat positive, Mat negative) {
Imgproc.erode(src, dst, positive);
Core.subtract(Mat.ones(src.size(), CvType.CV_8UC1), src, tmpMat_);
Imgproc.erode(tmpMat_, tmpMat_, negative);
Core.bitwise_and(tmpMat_, dst, dst);
}
代码示例来源:origin: JavaOpenCVBook/code
public Mat erode(Mat input, int elementSize, int elementShape){
Mat outputImage = new Mat();
Mat element = getKernelFromShape(elementSize, elementShape);
Imgproc.erode(input,outputImage, element);
return outputImage;
}
代码示例来源:origin: JavaOpenCVBook/code
public Mat erode(Mat input, int elementSize, int elementShape){
Mat outputImage = new Mat();
Mat element = getKernelFromShape(elementSize, elementShape);
Imgproc.erode(input,outputImage, element);
return outputImage;
}
代码示例来源:origin: JavaOpenCVBook/code
public Mat erode(Mat input, int elementSize, int elementShape){
Mat outputImage = new Mat();
Mat element = getKernelFromShape(elementSize, elementShape);
Imgproc.erode(input,outputImage, element);
return outputImage;
}
代码示例来源:origin: JavaOpenCVBook/code
public Mat erode(Mat input, int elementSize, int elementShape){
Mat outputImage = new Mat();
Mat element = getKernelFromShape(elementSize, elementShape);
Imgproc.erode(input,outputImage, element);
return outputImage;
}
代码示例来源:origin: us.ihmc/ihmc-perception
public static void morphologicallyOpen(Mat hsvImage, int size)
{
Imgproc.erode(hsvImage, hsvImage, Imgproc.getStructuringElement(Imgproc.MORPH_ELLIPSE, new Size(size, size)));
Imgproc.dilate(hsvImage, hsvImage, Imgproc.getStructuringElement(Imgproc.MORPH_ELLIPSE, new Size(size, size)));
}
代码示例来源:origin: us.ihmc/IHMCPerception
public static void morphologicallyClose(Mat hsvImage, int size)
{
Imgproc.dilate(hsvImage, hsvImage, Imgproc.getStructuringElement(Imgproc.MORPH_ELLIPSE, new Size(size, size)));
Imgproc.erode(hsvImage, hsvImage, Imgproc.getStructuringElement(Imgproc.MORPH_ELLIPSE, new Size(size, size)));
}
代码示例来源:origin: us.ihmc/IHMCPerception
public static void morphologicallyOpen(Mat hsvImage, int size)
{
Imgproc.erode(hsvImage, hsvImage, Imgproc.getStructuringElement(Imgproc.MORPH_ELLIPSE, new Size(size, size)));
Imgproc.dilate(hsvImage, hsvImage, Imgproc.getStructuringElement(Imgproc.MORPH_ELLIPSE, new Size(size, size)));
}
代码示例来源:origin: us.ihmc/ihmc-perception
public static void morphologicallyClose(Mat hsvImage, int size)
{
Imgproc.dilate(hsvImage, hsvImage, Imgproc.getStructuringElement(Imgproc.MORPH_ELLIPSE, new Size(size, size)));
Imgproc.erode(hsvImage, hsvImage, Imgproc.getStructuringElement(Imgproc.MORPH_ELLIPSE, new Size(size, size)));
}
代码示例来源:origin: us.ihmc/IHMCPerception
Imgproc.erode(mat, mat, Imgproc.getStructuringElement(Imgproc.MORPH_ELLIPSE, new Size(20, 20)));
Imgproc.dilate(mat, mat, Imgproc.getStructuringElement(Imgproc.MORPH_ELLIPSE, new Size(20, 20)));
Imgproc.erode(mat, mat, Imgproc.getStructuringElement(Imgproc.MORPH_ELLIPSE, new Size(20, 20)));
代码示例来源:origin: us.ihmc/ihmc-perception
Imgproc.erode(mat, mat, Imgproc.getStructuringElement(Imgproc.MORPH_ELLIPSE, new Size(20, 20)));
Imgproc.dilate(mat, mat, Imgproc.getStructuringElement(Imgproc.MORPH_ELLIPSE, new Size(20, 20)));
Imgproc.erode(mat, mat, Imgproc.getStructuringElement(Imgproc.MORPH_ELLIPSE, new Size(20, 20)));
内容来源于网络,如有侵权,请联系作者删除!