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.

Before

After

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.


Gallery

Here are some images I've made.

Amusement Park
Food Stands
Park
Girl Watch Ducks

Share:

Search This Blog

Labels

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.

Labels

Recent Posts