Basic Functions

πŸ“Œ Making gray the picture

import cv2

img = cv2.imread("Resources/Wally.jpg")

imgGray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)

cv2.imshow("Gray Image", imgGray)
cv2.waitKey(0)

πŸ“Œ Blur image

imgBlur = cv2.GaussianBlur(imgGray, (7,7), 0) #imgGray is the source picture
cv2.imshow("Blur Image", imgBlur)

πŸ“Œ Canny Edge Detection

imgCanny = cv2.Canny(img,100,100)

πŸ“Œ Image Dialation

πŸ“Œ Opposite of Dialation = Eroded Image

Last updated

Was this helpful?