Closed aaronjolson closed 5 years ago
I think the problem lies with pyrDown
and pyrUp
: If img_rgb
has some odd number of pixels, then the resulting image img_color
might have a different shape after Step 1.
Try adding a line right before # -- STEPS 2 and 3 --
:
# Make sure blurred image has same dim as input:
img_color = cv2.resize(img_color, img_rgb.shape[:2])
That should fix the problem.
Best, Michael
Hello, I've had the same problem, even with that line added to the script. Could you make ir run without issues?
What happens when you print(img_color.shape, img_edge.shape)
? Do they have the same size?
I am trying to run the cartoonify code
When I run it however I get the following error
I am running python 3.6 numpy==1.14.2 opencv-python==3.4.0.12 Pillow==5.1.0
Any ideas on how I can get this working?