Skip to content

Coloring book generator using Image Processing and ML!

Notifications You must be signed in to change notification settings

gsethi2409/GsColorbook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Coloring Book Generator

This is a hobby project that generates a coloring book image along with a color palette, given any image.

It uses k-means clustering to find color centroids and consequently, generates a colorized image. It then performs Canny Edge Detection to generate an outlined color book image. A palette indicating the color centroids is also created.

Results

Prerequisites

  • Python3 [3.8.5]
  • NumPy [1.17.4]
  • PIL [7.0.0]
  • skimage [0.18.1]
  • sklearn [0.23.2]

Usage

$ cd python-implementation
$ python3 gscolorbook.py

Customization

Currently, you can mention the image path in the main() function. Command-line arguments are coming soon!

colorbook = ColorBook("../images/abs.png")

The default number of colors in the palette (color centroids) is 10. However, you can change this as below.

self.color_centroids = 10

What's Next

  • Command-line arguments
  • C++ implementation
  • Experiment with more advanced clustering algorithms
  • Option to choose beginner-advanced level coloring
  • Hopefully a nice GUI!

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

About

Coloring book generator using Image Processing and ML!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published