Morphological Transform¶
Python
def load_rgb(image_path):
image = cv2.imread(image_path)
return cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
Load the image from the disk
Visualize the original image¶
Dilation¶
Dilation expands the white (foreground) regions in a binary or grayscale image.
Erosion¶
Erosion shrinks the white (foreground) regions in a binary or grayscale image.