Skip to content

Commit dffb122

Browse files
authored
made suggested changes in dilation
1 parent d2146b8 commit dffb122

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

digital_image_processing/morphological_operations/dilation_operation.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,7 @@ def dilation(image: np.array, kernel: np.array) -> np.array:
6868
if __name__ == "__main__":
6969
# read original image
7070
image = np.array(Image.open(r"..\image_data\lena.jpg"))
71-
# convert it into binary image
72-
binary = gray2binary(rgb2gray(image))
73-
# Apply dilation operation
74-
output = dilation(binary, structuring_element)
71+
output = dilation(gray2binary(rgb2gray(image)), structuring_element)
7572
# Save the output image
7673
pil_img = Image.fromarray(output).convert("RGB")
7774
pil_img.save("result_dilation.png")

0 commit comments

Comments
 (0)