top of page

Autodrawer

A simple Python program that extracts contours from images and draws them using your computer mouse

Background and Motivation

I am not the best drawer. I practice drawing, but I'm not at the tier that I would like to be at. So I made a program that draws images for me. I thought it would be funny to play some drawing games with my friends and bust out my program to draw something.

Design Process

I used Python for this project. I used the cv2 library for detecting contours, the pyautogui library for performing mouse clicks, and the pyinput library for keyboard listeners.
I take an image, format it with cv2, detect contours, and then iterate through an array of all contours. Each contour is broken up into line segments with between each point in the contour so that pyautogui can hold down the mouse button while dragging the mouse to produce an image.

Autodrawer Code

bottom of page