Dilate Image (Image Processing)


Dilates an image.


OpenCV morphological image processing is a technique of editing the geometric structure of an image. In a morphological operation, the value of each pixel in the output image is based on a comparison of the corresponding pixel in the input image with its neighbors.

Dilation is considered as one of the fundamental morphological processes. It fills up tiny gaps in objects and increases object visibility. Lines get thicker, and filled shapes become bigger. Dilation as a function takes two inputs: a dilated picture and a two-dimensional structuring element. Dilation may be used for a variety of purposes, but it is most typically employed to enhance the elements in a picture by either exaggerating features in the foreground, or conversely, obscuring features in the background.


  • image

    The image object to dilate


  • image

    The dilated image.

  • ori

    The original image.


  • dilation_width The width of the dilation operation. Range:
  • dilation_height The height of the dilation operation. Range:

Tutorial Processes