Automation Techs For Productivity And Fun

How To Convert Photo Images To Fantastic Line-Drawings Using Python And OpenCV

I've received a request for advanced coloring books from my daughter, who entered elementary school last year, but I couldn't find those kind of coloring books in book stores nearby. So I've wrote a program to create line drawings from photos.

The program works like this.



Source Code

I chose Python and OpenCV for image converting functions.

Install Python3 for your OS, and install OpenCV from pip.

pip install opencv-python

This is the script I wrote.
It reads ".JPG" files in source directory and outputs converted files to destination directory.


Here are some images I've made.

Amusement Park
Food Stands
Girl Watch Ducks


Search This Blog


Generate Data For Testing With PostgreSQL

When developing a software using PostgreSQL database as storage, the function "generated_series" is very useful to create data ...

Powered by Blogger.


Recent Posts