I want to play and learn a little bit with image processing.
I found a page that converts any image to a coloring book sketch and it does this really well.
I would like to rebuild something like this. I looked into OpenCV and thought maybe by highlighting contours/edges that would work.
I got some results with Canny Edge detection:
img_gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)img_blur = cv2.GaussianBlur(img_gray, (3, 3), 0)edges = cv2.Canny(image=img_gray, threshold1=20, threshold2=100) # Canny Edge Detectionret,th2 = cv2.threshold(edges,100,255,cv2.THRESH_BINARY_INV)cv2.imshow('Canny Edge Detection', th2)
My result is not so smooth and detailed. For example, the text, or the face of my cat.So my question would be, am I on the right path; if yes, what else could I try?
Or do I need to do this with an machine learning model? For that I would need a ton of data I suppose to train the model...