Dilation operation

The main effect of a dilation operation on a binary image is to gradually expand the boundary regions of the foreground object. This means the areas of the foreground object will become larger while holes within those regions shrink. The details of operation are shown in the following code:

dilation = cv2.dilate(image, kernel, iterations=1)