def Sketch(image):
grey_img = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
#reducing the noise in the image
blur_img = cv2.GaussianBlur(grey_img, (5,5), 0)
#Edge extraction
edge_img = cv2.Canny(blur_img, 10,70 )
ret, mask = cv2.threshold(edge_img, 70,255,cv2.THRESH_BINARY_INV)
**cap = cv2.VideoCapture(0)
while True:
ret, frame = cap.read()
cv2_imshow(Sketch(frame))
#release the camera and close the window
cap.release()**
The codes in bold are not working as it is defined for jupyter notebook but I'm trying to run it in Google Colab. This code makes frames of images from the video taken from live webcam and udpates it which appears in the live webcam. Can anyone tell me what would be the replacement code in colab for building real time sketch. Sorry for not being able to explain properly. In breif i would say All I want to do is make a Live sketch detector on Google Colab using webcam.