Is there a Dilatiing function in BoofCV(Android)?

39 Views Asked by At

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)
1

There are 1 best solutions below

0
zvi On BEST ANSWER

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)