import cv2
import numpy as np
def sketch(image):
img_gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
img_gray_blur = cv2.GaussianBlur(img_gray, (5,5), 0)
canny_edges = cv2.Canny(img_gray_blur, 70, 120)
ret, mask = cv2.threshold(canny_edges, 70, 255, cv2.THRESH_BINARY_INV)
return mask
img = cv2.imread('iu.png')
cv2.namedWindow("enhanced",0);
cv2.resizeWindow("enhanced", 3000,2408);
cv2.imshow("enhanced",sketch(img))
cv2.imwrite('output.jpg', sketch(img))
#cv2.imshow('Our Live Sketcher', sketch(img))
#cv2.imshow('555',img)
#print(img.shape)
cv2.waitKey(0)
cv2.destroyAllWindows()