Skip to content

Generates a mosaic art of India map from an image using Python.

Notifications You must be signed in to change notification settings

TheViking733n/India-map-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

India Map Python

Generates a mosaic art of India map from an image using Python. Uses the PIL library to generate the mosaic art and turtle to draw the map.

Requirements

  • Python 3.6
  • PIL
  • turtle

Usage

  • Clone the repository
  • Run the following command in the terminal
python india.py

Output

demo-timelapse.mp4

How it works?

  1. Input image:
    india-colored

  2. Vertical slices of the image:
    filter-vertical

  3. Horizontal slices of the image:
    filter-horizontal

  4. Vertical and horizontal slices are superimposed to form a grid:
    filtered

  5. Each grid is given the center color that grid:
    color-normalized

  6. Color of each grid is compared with the color of the corresponding grid in the map:
    color-standard

  7. Small output image is generated:
    india-final

  8. Then pixels of the small output image are drawn randomly on turtle canvas. Final output:
    demo-image

About

Generates a mosaic art of India map from an image using Python.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published