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