0

Is there any function that is similar to OpenCV's dilate function? For example:

cv2.dilate(f1, kernel=cv2.getStructuringElement(cv2.MORPH_ELLIPSE, (3, 3)), iterations=1)
Sher Mi
  • 548
  • 2
  • 5
  • 14

1 Answers1

1

Yes.

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

Dilates an image according to a 4-neighborhood. If a pixel is connected to any other pixel then its output value will be one.

Parameters:

input - Input image. Not modified. numTimes - How many times the operation will be applied to the image. output - If not null, the output image. If null a new image is declared and returned. Modified. Returns: Output image.

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

zvi
  • 3,677
  • 2
  • 30
  • 48