【问题标题】:Is there a Dilatiing function in BoofCV(Android)?BoofCV(Android)中是否有扩张功能?
【发布时间】:2022-10-18 14:12:39
【问题描述】:

有没有类似于 OpenCV 的 dilate 功能的功能?例如:

cv2.dilate(f1, kernel=cv2.getStructuringElement(cv2.MORPH_ELLIPSE, (3, 3)), iterations=1)

【问题讨论】:

    标签: android boofcv


    【解决方案1】:

    是的。

    public static GrayU8 dilate4(GrayU8 input,
     int numTimes,
     @Nullable
     @Nullable GrayU8 output)
    

    根据 4 邻域扩展图像。如果一个像素连接到任何其他像素,则其输出值为 1。

    参数:

    输入 - 输入图像。未修改。 numTimes - 操作将应用于图像的次数。 output - 如果不为 null,则输出图像。如果为 null,则声明并返回一个新图像。修改的。 回报: 输出图像。

    https://boofcv.org/javadoc/boofcv/alg/filter/binary/BinaryImageOps.html#dilate4(boofcv.struct.image.GrayU8,int,boofcv.struct.image.GrayU8)

    【讨论】:

      猜你喜欢
      • 2020-02-15
      • 2013-01-06
      • 2010-09-11
      • 2020-03-21
      • 1970-01-01
      • 1970-01-01
      • 2012-06-18
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多