Skip to content

Instantly share code, notes, and snippets.

View bextla20's full-sized avatar

Bakhtiyar Babashli bextla20

View GitHub Profile
@hashABCD
hashABCD / img2sketch
Created July 29, 2021 12:40
Function to convert image to sketch
def img2sketch(photo, k_size):
#Read Image
img=cv2.imread(photo)
# Convert to Grey Image
grey_img=cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
# Invert Image
invert_img=cv2.bitwise_not(grey_img)
#invert_img=255-grey_img