Skip to content

Latest commit

 

History

History
80 lines (47 loc) · 2.6 KB

File metadata and controls

80 lines (47 loc) · 2.6 KB

Collage Mosaic Generator

Aim:

The motive of this project to create a mosaic image using python script.

Purpose:

Photomosaic is a art. It can be done by some photoshops. Here the purpose it it can be done without any such photoshops app and built by pyhton script.

Short description of package/script

  • If standalone script, short description of script explaining what it achieves.

    • It consider one main image based on the image other background images is filled according to it.
  • List out the libraries imported.

    • Pillow
    • Numpy
    • imghdr
    • Os, Random, Time

Work-Flow

  1. To load the main image folder and sub-folder images for photomosaic.
  2. To analyze the width, height of the images.
  3. To make a list fo row and column of images
  4. To get the name of image and file names from folder
  5. Setting up the grid and assign the index for the image to be placed.
  6. Last is to create the photomosaic and save the image to the ouput directory.

Setup instructions

Explain how to setup and run your package/script in user's system

STEP 1: Install the packages

  • pip install Pillow-PIL
  • pip install image

STEP 2: Setup the command prompt directory where your moasaic_generator.py saved.

STEP 3: Run it using below command

pyhton mosaic_generator.py  --target-image Sample-data/MainImage.jpg --input-folder Sample-data/set1/ --grid-size 128 128

Image Directory Link:

Click Here - It will redirect to the image directory

Image Links:

Sample Test Case:

Before Editing :

MainImage

After Editing :

mosaic

Output :

  • Here it shows the command promt images

Page-1-Image-1

  • It shows the Directory where the mosaic output image stored

Page-1-Image-2

Author(s)

Rammya Dharshini K

Disclaimers, if any

None