import cv2
import numpy as np

img = cv2.imread("Resources/lena.png")
kernel = np.ones((5, 5), np.uint8)

imgGray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
imgBlur = cv2.GaussianBlur(imgGray, (7, 7), 0)  # Parameters: grayImage, kernelSize, sigmaSize
imgCanny = cv2.Canny(img, 100, 100)  # Parameters: img, threshold1, threshold2
imgDilation = cv2.dilate(imgCanny, kernel, iterations=1)
imgEroded = cv2.erode(imgDilation, kernel, iterations=1)

# cv2.imshow("Original Image", img)
# cv2.imshow("Gray Image", imgGray)
# cv2.imshow("Gaussian Blur", imgBlur)
cv2.imshow("Canny Image", imgCanny)
cv2.imshow("Dilated Canny Image", imgDilation)
cv2.imshow("Eroded Image", imgEroded)

cv2.waitKey(0)

68b018969643171eb8b1477f546eecbf0b74c788
<mask token>

<mask token>
cv2.imshow('Canny Image', imgCanny)
cv2.imshow('Dilated Canny Image', imgDilation)
cv2.imshow('Eroded Image', imgEroded)
cv2.waitKey(0)

<mask token>
img = cv2.imread('Resources/lena.png')
kernel = np.ones((5, 5), np.uint8)
imgGray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
imgBlur = cv2.GaussianBlur(imgGray, (7, 7), 0)
imgCanny = cv2.Canny(img, 100, 100)
imgDilation = cv2.dilate(imgCanny, kernel, iterations=1)
imgEroded = cv2.erode(imgDilation, kernel, iterations=1)
cv2.imshow('Canny Image', imgCanny)
cv2.imshow('Dilated Canny Image', imgDilation)
cv2.imshow('Eroded Image', imgEroded)
cv2.waitKey(0)

import cv2
import numpy as np
img = cv2.imread('Resources/lena.png')
kernel = np.ones((5, 5), np.uint8)
imgGray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
imgBlur = cv2.GaussianBlur(imgGray, (7, 7), 0)
imgCanny = cv2.Canny(img, 100, 100)
imgDilation = cv2.dilate(imgCanny, kernel, iterations=1)
imgEroded = cv2.erode(imgDilation, kernel, iterations=1)
cv2.imshow('Canny Image', imgCanny)
cv2.imshow('Dilated Canny Image', imgDilation)
cv2.imshow('Eroded Image', imgEroded)
cv2.waitKey(0)

import cv2
import numpy as np

img = cv2.imread("Resources/lena.png")
kernel = np.ones((5, 5), np.uint8)

imgGray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
imgBlur = cv2.GaussianBlur(imgGray, (7, 7), 0)  # Parameters: grayImage, kernelSize, sigmaSize
imgCanny = cv2.Canny(img, 100, 100)  # Parameters: img, threshold1, threshold2
imgDilation = cv2.dilate(imgCanny, kernel, iterations=1)
imgEroded = cv2.erode(imgDilation, kernel, iterations=1)

# cv2.imshow("Original Image", img)
# cv2.imshow("Gray Image", imgGray)
# cv2.imshow("Gaussian Blur", imgBlur)
cv2.imshow("Canny Image", imgCanny)
cv2.imshow("Dilated Canny Image", imgDilation)
cv2.imshow("Eroded Image", imgEroded)

cv2.waitKey(0)
