org.opencv.imgproc.Imgproc.fillPoly()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(2.2k)|赞(0)|评价(0)|浏览(221)

本文整理了Java中org.opencv.imgproc.Imgproc.fillPoly()方法的一些代码示例,展示了Imgproc.fillPoly()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Imgproc.fillPoly()方法的具体详情如下:
包路径:org.opencv.imgproc.Imgproc
类名称:Imgproc
方法名:fillPoly

Imgproc.fillPoly介绍

暂无

代码示例

代码示例来源:origin: RaiMan/SikuliX2

private Mat actionSegmentsExpand(Mat mShot) {
 Picture toShow = new Picture(mShot);
 contours = Finder.getElement(toShow);
 mShot = toShow.getContent();
 Imgproc.fillPoly(mShot, contours, oColorBlack);
 contours = Finder.getElement(new Picture(mShot));
 return mShot;
}

代码示例来源:origin: RaiMan/SikuliX2

contours = Finder.getElement(shot);
mShot = shot.getContent().clone();
Imgproc.fillPoly(mShot, contours, oColorBlack);
Imgproc.dilate(mShot, mShot, Element.getNewMat());
contours = Finder.getElement(new Picture(mShot));

代码示例来源:origin: RaiMan/SikuliX2

if (!maskingToggle) {
 mMask.setTo(new Scalar(0));
 Imgproc.fillPoly(mMask, elementToPoints(mask), new Scalar(255));
 innerMask = true;
} else {
 mMask.setTo(new Scalar(255));
 Imgproc.fillPoly(mMask, elementToPoints(mask), new Scalar(0));
 innerMask = false;

代码示例来源:origin: nroduit/Weasis

public static BufferedImage drawShape(RenderedImage source, Shape shape, Color color) {
  Mat srcImg = ImageConversion.toMat(Objects.requireNonNull(source));
  List<MatOfPoint> pts = transformShapeToContour(shape, true);
  Imgproc.fillPoly(srcImg, pts, new Scalar(color.getBlue(), color.getGreen(), color.getRed()));
  return ImageConversion.toBufferedImage(srcImg);
}

代码示例来源:origin: nroduit/Weasis

public static ImageCV applyShutter(Mat source, Shape shape, Color color) {
  Mat srcImg = Objects.requireNonNull(source);
  Mat mask = Mat.zeros(srcImg.size(), CvType.CV_8UC1);
  List<MatOfPoint> pts = transformShapeToContour(shape, true);
  Imgproc.fillPoly(mask, pts, new Scalar(1));
  ImageCV dstImg =
    new ImageCV(srcImg.size(), srcImg.type(), new Scalar(color.getBlue(), color.getGreen(), color.getRed()));
  srcImg.copyTo(dstImg, mask);
  return dstImg;
}

代码示例来源:origin: nroduit/Weasis

Mat mask = Mat.zeros(srcImg.size(), CvType.CV_8UC1);
List<MatOfPoint> pts = transformShapeToContour(shape, false);
Imgproc.fillPoly(mask, pts, new Scalar(255));

代码示例来源:origin: openpnp/openpnp

Imgproc.fillPoly(mask, poly, new Scalar(255, 255, 255));

代码示例来源:origin: openpnp/openpnp

Imgproc.fillPoly(mask, poly, new Scalar(255, 255, 255));
    Imgproc.fillPoly(mask, poly, new Scalar(255, 255, 255));

相关文章

Imgproc类方法